HI: I installed weblogic6.1 on winNT. I wrote all the EJB code - Hello, I defined the JNDI name Which is 'HelloHome' in weblogic-ejb-jar.xml. but when I run the EJB Client, I got the following error:
javax.naming.NameNotFoundException: Unable to resolve HelloHome. Resolved: '' Un resolved:'HelloHome' ; remaining name '' at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundR equest.java:85) at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR ef.java:253) at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR ef.java:220) at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35) at $Proxy0.lookup(Unknown Source) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323) at javax.naming.InitialContext.lookup(Unknown Source) at com.etco.af.tests.hello.HelloTest.main(Unknown Source) I really don't know what happen. Any difference of directories between weblogic6.1 and weblogic6.0? Please help!!! Sarah
Pls post your ejb-jar.xml and weblogic-ejb-jar.xml and the piece of code where you try to recover the jndi context, cause problably something is wrong with it, I use WL6.1 and don�t have problems with jndi. If you post it we�re gonna be able to help you. regards.
Hi, try to change the DOC type from your weblogic-ejb-jar.xml to: < !DOCTYPE weblogic-ejb-jar PUBLIC <br /> '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' <br /> 'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'> and also if it does not work try to make a straigth cast(I know this is out of the specs, but as you know it�s a java type and not a CORBA object you can do so) to the home tipe of your bean in the lookup method as: EJBHome home = (EJBHome) ctx.lookup("JNDI_NAME"); if this doesn�t work you can send me the code at: firstname.lastname@example.org or email@example.com and I�ll take a look for you. regards.
Thanks all! Marcos, I modified my code as you suggested but still doesn't work, same error message. Then I wrote a small simple Hello code which works fine. In MyProxy code, I need to use dynamic proxy class, that maybe the reason cause the problem. But I don't know why. Do you have any idea it or some samples of dynamic proxy class? Thanks again!