• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in JNDI lookup  RSS feed

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I'm getting a javax.naming.NameNotFoundException in Weblogic 10.x when I'm trying to do a JNDI lookup. I have given my JNDI as a constant in Remote interface of my stateless bean as BeanName#com.package.RemoteInterfaceName. Any suggestions on how to get around this?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way to debug the NameNotFoundException is to view the jndi tree and see to what jndi-name the bean is bound. I haven't used WebLogic so don't know the steps for viewing the jndi tree. Maybe their server documentation has these steps.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked the JNDI tree after deployment and for the old EJB 2.x beans, I can see the JNDI names that I used but for the new EJB 3 beans, I'm seeing a wierd name which is far different from what I have given. Another question that I have here is, do I also have to define my new EJB 3 beans in the weblogic-ejb.jar file? I think this could be the solution. Let me try this.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any patterns in declaring JNDI names for EJB 3 beans in Weblogic 10.x?
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html

Got a fix to my problem in the above link. But why do I have to postfix the fully qualified class name after the #?? and in particular with Weblogic?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!