Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"jndi:ejb not bound" error while deploying EJB

 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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:

 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic