• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"jndi:ejb not bound" error while deploying EJB

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to Deploy an EJB in JBoss 5.1GA and getting a "jndi:ejb not bound" error and the deployment fails.
Below is the information about my deployment.
Any help is greatly appreciated.

Code :



ejb-jar.xml:




jboss.xml:



jndi.properties inside server/all/conf:



JNDI View (from JMX-Console):



JBoss start-up Logs when the EJB gets deployed:

 
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
Looks like you are using EJB2 beans. If so, switch to 2.1 xsd in ejb-jar.xml instead of 3.0:

 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

I changed the XSD in the ejb-jar.xml and got a "java.lang.IllegalArgumentException: Null dependency".
Any ideas as to what tags I should look for to rectify in the ejb-jar.xml?

Stack Trace:

 
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
Post the contents of your latest ejb-jar.xml and jboss.xml
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

I had removed the ejb2-timer-service.xml from the all/deploy directory? Is that going to be a problem in JBoss 5.1?
By looking at the stack trace, I looked up some other posts and JBoss code and see that the "Null dependency" is thrown
if the timer is null in the deploy(function) in EjbDeployer.java.
I added the ejb2-timer-service.xml and replaced it with my Datasource name and still had a problem.
Then I changed the following in ejb2-timer-service.xml and still got the same null dependency error:

Commented the MBean:



and uncommented:


and then changed the persistence policy from "database" to "noop" in the following mbean in the same ejb2-timer-service.xml:


jboss.xml



ejb-jar.xml

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic