| Author |
EJB3 session bean lookup problem from jsp
|
mach zro
Greenhorn
Joined: Jul 08, 2010
Posts: 4
|
|
Hi,
I am trying to write a simple stateless EJB 3 with weblogic 10.3 and JDK 1.6_05.
My bussiness interface is
businessLogicBean
JSP code :
ejb-jar.xml
but gettin error
javax.naming.NameNotFoundException: While trying to lookup 'example.ejb.session.Hello' didn't find subcontext 'example'. Resolved ''; remaining name 'example/ejb/session/Hello'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
I dont know where i am going wrong? please help
|
 |
mach zro
Greenhorn
Joined: Jul 08, 2010
Posts: 4
|
|
|
Waiting for reply
|
 |
rajan patil
Greenhorn
Joined: Feb 28, 2010
Posts: 3
|
|
Try following to lookup:
Hello hello=(Hello)ctx.lookup("HelloBean");
if you still getting exception then check your global jndi tree in weblogic and use that name.
By looking at your code it seems that your ejbs jndi name should be HelloBean.
|
 |
 |
|
|
subject: EJB3 session bean lookup problem from jsp
|
|
|