[jboss-user] [JNDI/Naming/Network] - Re: New EJB causes JNDI failure on existing EJB?
jaikiran
do-not-reply at jboss.com
Wed Dec 12 03:08:29 EST 2007
When is the lookup being done? Is it done when the server is starting up? Or is it after the deployment of your application has been done successfully?
anonymous wrote : javax.naming.NameNotFoundException: MyWorkerBean not bound
How are you packaging the application? Is it just a jar file or an ear? If it's an ear then you will have to prefix the name of the ear file to the JNDI name. For example, if your application is MyApp.ear and the bean implementation classname is MyWorkerBean and your are looking up the remote interface, then the default lookup string will be:
| MyWorker myWorker = (MyWorker) context.lookup("MyApp/MyWorkerBean/remote");
And the most important thing to do when you run into a NameNotFoundException is to look at the JNDI tree through the jmx-console of JBoss. That will show you the exact lookup string you have to use. For more details, you can refer http://jaitechwriteups.blogspot.com/2007/10/why-do-i-get-namenotfoundexception.html
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112163#4112163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112163
More information about the jboss-user
mailing list