Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to access to WEB classes from EJB.  RSS feed

 
selvakumar Thiyagarajan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB.
I created a new listener to the existing project. The existing project doesnt have a EJB and it have only WEB. From the listener (onMessage()), i have to access DAO which is inside WEB folder. I am getting the below error on runtime,

ejb threw unexpected non declared exception during invocation method onmessage

The environment I am is using websphere application server 6.1.

I tried exporting the classes as JAR and added as dependency to the EJB . But still i am getting the same error.
Please advice on this.
 
selvakumar Thiyagarajan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue is resolved. Its because EJB got loaded before the WEB. Changing the WAR classloader policy to APPLICATION resolved the issue. WAR class loader policy will be available in deployment tab of application deployment descriptor file
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing the solution!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!