Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB3 @EJB annotation not loading Session bean

 
murali kankanala
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have implemented an EJB 3.0 stateless session bean, i have tested this in standalone program by using JNDI and its working fine.
But where as when use @EJB annotation in my servlet its not looking up the ejb object i am getting nullpointer exception because of this. I knew its not able to lookup ejb that is why its giving nullpointer exception, but my problem is why it is not able to look up the bean. Do i need to setup any thing in my weblogic webapp. This webapp and ejb are running in the same weblogic server.

Servlet code:

I appreciate your clearcut setup information.


thanks,
Murali
 
murali kankanala
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even in my standalone program also its not working if i use @EJB annotation , if i use JNDI its working. What do i need to setup ?



Not surprisingly i got NullPointerException.

 
murali kankanala
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood that i need to run some ACC command appclient - client sampleClient.jar.
But when i run this i am getting this forllowing error.



application-client.xml



jndi.properties


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic