• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

EJB 3.0 lookup problem in JBOSS

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am able to deploy my Session bean successfully in JBOSS under default/deploy folder using the Netbeans IDE. The client for the same could get the reference and invoke the methods.

The deployment for the same deployed jar file when placed under all/deploy goes through fine. But when the client (same client that worked with Netbeans deployement) tries to do a JNDI lookup for the remote interface NamenotFoundException is thrown.

Could somebody help me solve this problem.

best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I could think of two things going wrong here:

1) Do you start your client from outside Netbeans? Do you have a properties file for the JNDI configuration in place or are the lookup properties directly in your client code? As a NamenotFoundException is thrown it's probably not this problem.

2) Be careful which JNDI lookup name is used to lookup the the interface of your session bean. With Netbeans for example it's a different name when you create an enterprise application as a container for all EJB modules and deploy this enterprise application in contrast to a separate EJB module. It's the best idea to use the JMX console of JBoss to view it's JNDI tree. If you start the JMX console in your browser there should be an MBean "JNDIView" (if I remember it correctly). This gives you a text output of the JNDI data. Search for your interface or bean you're looking for and use this name in your client code. In your client code you have to separate each layer of this JNDI view with a slash in the lookup name.

I hope this may help you. If something is unclear just let me know.

    Bookmark Topic Watch Topic
  • New Topic