Community

Error working wih EJB3, Struts2 & JBoss 4.2GA

reply from Wolfgang Knauf in EJB 3.0 - View the full discussion

Hi,

 

first: your bean does not implement the remote interface:

 

 

class AuthenticationBean implements AuthenticationLocal, Authentication

 

 

 

 

Maybe this results in deployment problems.

 

second: your lookup should cast the result to the interface, not to the bean instance!

 

 

AuthenticationLocal authEjb = (AuthenticationLocal) ctx.lookup("AuthenticationLocal");

 

 

I don't know wheter your "@Local"/"@Remote" declarations work, I think it is better to place them on the interfaces (without parameters in this case).

 

Hope this helps

 

Wolfgang

Reply to this message by going to Community

Start a new discussion in EJB 3.0 at Community