File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes EJB3 @EJB annotation not loading Session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "EJB3 @EJB annotation not loading Session bean" Watch "EJB3 @EJB annotation not loading Session bean" New topic
Author

EJB3 @EJB annotation not loading Session bean

murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
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

Joined: Nov 15, 2004
Posts: 110
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

Joined: Nov 15, 2004
Posts: 110
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


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB3 @EJB annotation not loading Session bean
 
Similar Threads
Conversational state and passivation
Running Session bean under eclipse
@EJB annotation is not working in weblogic 10.3
Problems with EJB Local and using servlets - null pointers
EJB Remote vs Local deployment....difference???