Hi, I make a ejb and a test client,I want test RMI/IIOP in JBoss.
My problem is: In JBoos/IIOP project page(http://www.jboss.org/developers/projects/jboss/iiop.jsp),there say:"To specify that an EJB should be deployed in an IIOP container, include in its jboss.xml file a configuration-name entry for one of the IIOP container configurations: <configuration-name>IIOP Stateless SessionBean</configuration-name> " but if I don't add the line and I start JBoss and goto JNDIView(http://localhost:8082/InvokeAction//jboss%3Aservice%3DJNDIView/action=listXML?action=listXML) I'll get some lines like below: ... file%/C%/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/WellProd.jar java:comp WellDayData env org.jnp.interfaces.NamingContext java: ... comp javax.naming.Context Global WellDayData $Proxy25 ... And I can use a few lines like below in client to get the EJB's Home Interface sucessfully: java.util.Hashtable JNDIParm = new java.util.Hashtable(); JNDIParm.put(Context.PROVIDER_URL, "localhost"); JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); Context ctx = new InitialContext(JNDIParm); Object ref = ctx.lookup("WellDayData"); If I add the line,then I get lines like below: ... file%/C%/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/WellProd.jar java:comp WellDayData env org.jnp.interfaces.NamingContext java: ... comp javax.naming.Context Global WellDayData javax.ejb.EJBHome When I run the client code,the program will raise a exception at the last like below: javax.naming.NamingException: Could not dereference object. Root exception is java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) at org.jboss.ejb.plugins.iiop.HomeFactory.getObjectInstance(HomeFactory.java:42) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:538) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429) at javax.naming.InitialContext.lookup(InitialContext.java:350) at tstejb.WellDayDataTestClient1.<init>(WellDayDataTestClient1.java:27) at tstejb.WellDayDataTestClient1.main(WellDayDataTestClient1.java:142) Who can give me an explain? _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
