Hi,
I am newbie in ejb. I'm calling an ejb local interface and getting an exception (BEA WLS 8.1):
** Unable to connect to the server at:
javax.naming.LinkException: [Root exception is ...
How can I fix this problem?
Thanks for the help.
Wolfgang
The client code:
Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
Context ctx = new InitialContext(p);
StudentLocalHome localHome = (StudentLocalHome) ctx.lookup("StudentLocalEJB");
The ejb-jar.xml:
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>StudentEJB</ejb-name>
<local-home>com.pro.StudentLocalHome</local-home>
<local>com.pro.StudentLocal</local>
<ejb-class>com.pro.StudentBean</ejb-class>
...
</ejb-jar>
The weblogic-ejb-jar.xml:
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>StudentEJB</ejb-name>
...
<local-jndi-name>StudentLocalEJB</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
-
problem looking up an ejb local interface (1 messages)
- Posted by: wolfgang fong
- Posted on: August 09 2005 11:20 EDT
Threaded Messages (1)
- problem looking up an ejb local interface by Ray Baco on August 16 2005 00:04 EDT
-
problem looking up an ejb local interface[ Go to top ]
- Posted by: Ray Baco
- Posted on: August 16 2005 00:04 EDT
- in response to wolfgang fong
The fact that there is no address for the server after the colon in your exception trace leads me to believe that you need to put in the property value for Context.PROVIDER_URL in your Porperties object to initialize the InitialContext. Try this - it may well solve your problem.