| Author |
"jndi:ejb not bound" error while deploying EJB
|
Ananth Vasudevan
Ranch Hand
Joined: Sep 30, 2010
Posts: 30
|
|
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
Joined: Jul 20, 2005
Posts: 8208
|
|
Looks like you are using EJB2 beans. If so, switch to 2.1 xsd in ejb-jar.xml instead of 3.0:
|
[My Blog] [JavaRanch Journal]
|
 |
Ananth Vasudevan
Ranch Hand
Joined: Sep 30, 2010
Posts: 30
|
|
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
Joined: Jul 20, 2005
Posts: 8208
|
|
Post the contents of your latest ejb-jar.xml and jboss.xml
|
 |
Ananth Vasudevan
Ranch Hand
Joined: Sep 30, 2010
Posts: 30
|
|
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
|
 |
 |
|
|
subject: "jndi:ejb not bound" error while deploying EJB
|
|
|