• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JNDI Name binding in JBOSS 5.1.0 Beta.

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

I am following the MasteringEJB4thEdition book, which I downloaded from The Server Site website.

There is a simple example of HelloBean, which works perfectly with GlassFish V3 app server. The same example when deployed on JBOSS fails because of JNDI name lookup.

Is there any rule how the JNDI lookup names in JBOSS are decided if we don't provide any ? I found while googling that it is "<ear-file-name>/<Bean-class-name>/remote" but it doesn't work for me.

Here is the bean




Here is the client I am using:


Here is the error I get while executing the client



 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you deploy it in a EAR? If not, it's just the BeanClassName/remote. In any case, the server console will show the exact JNDI name that's being used for the bean, when the bean is being deployed. Something like:



What do you see on your console?
 
Hardik Mehta
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thanks for the quick reply.

I checked the deployment logs, and I found something like this...



Look the part after Global JNDI: is empty.

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have any ejb-jar.xml or jboss.xml in the jar? If yes, please post its contents. Also see this thread for a similar issue
 
Hardik Mehta
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jaikiran,

Exactly this was the problem, I was missing namespace information in the ejb-jar.xml.


Now I changed it according to your link..



Now it works as expected.


 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic