Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB not bound

 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an ear which contains several ejb jar and one war file. In the war file we have defined references to some ejb inside the web.xml. The problem is when I am deploying the ear into Oracle App Server its working fine but as soon as I deploy it into JBoss 5.0.1 GA it throws error. The ejb that is showing error is defined in web.xml as


The error I am getting on console is



Any help on this problem would be highly appreciated.

Thanks,
Uttam Kumar
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked myself the reason for this exception: The problem of "Could not dereference object" seems to appear when the JNDI name actually exists but the resource references has a broken link, ie the name points on to another name that doesn't exist. When the name doesn't exist at all in the first place we'll get the "name not bound exception".

In server.log I could see that the EJBs were actually deployed and bound to the JNDI


I tried making link using jboss.xml but still didnt get succeeded


Is here anyone who can at-least give me a hint what could be the problem?

Thanks,
Uttam Kumar
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is incorrect. You should be pointing to the jndi name of the EJB, if you want the ejb-ref. Remove the java: part from it:

 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I even tried that one but still problem didn't solved. Please suggest.

Thanks,
Uttam Kumar
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Upgrade to 5.1.0 since 5.0.1 had many issues with deployment
2) Post the entire exception stacktrace with the changes that you did to your configs.
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the log:
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I am downloading JBoss 5.1.0 GA I would like you to have a look at the log and see if it gives you any hint.

Thanks for you support.

Regards,
Uttam Kumar
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at com._360commerce.webmodules.employee.ui.LoginAttemptFilter.init(LoginAttemptFilter.java:67)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)


Looks like a deployment ordering issue. Your web application .war is being deployed before the EJBs are bound to JNDI. You'll have to add a dependency on the EJB container's MBean in your jboss-web.xml.
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats it !!! it worked.

I added following entry into jboss-web.xml



Thanks for your help Jai.

Regards,
Uttam Kumar
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic