I am trying to call a remote EJB in a Liberty Profile server following the Redbook example (IBM WebSphere Application Server Liberty Profile Guide for Developers, 5.2.3 Developing applications using remote EJB).
All compiles and deploys with no problems, but at run time gives this error message:
Error 404: javax.servlet.UnavailableException: SRVE0319E: For the [com.ibm.itso.ejbRemote.HelloRemoteServlet] servlet, com.ibm.itso.ejbRemote.HelloRemoteServlet servlet class was found, but a resource injection failure has occurred. CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/com.ibm.itso.ejbRemote.HelloRemoteServlet/helloRemoteBean reference. The exception message was: CWNEN1003E: The server was unable to find the java:global/ITSORemote/ITSORemoteEJB/HelloRemoteEJB!com.ibm.itso.ejbRemote.view.HelloRemoteEJBRemote binding with the com.ibm.itso.ejbRemote.view.HelloRemoteEJBRemote type for the java:comp/env/com.ibm.itso.ejbRemote.HelloRemoteServlet/helloRemoteBean reference.
What can be wrong? Local EJB example works just fine.
Is it enough to specify the remote EJB just in the client code or has it to be somewhere else too (property file or server.xml)?
@EJB(lookup="java:global/ITSORemote/ITSORemoteEJB/HelloRemoteEJB!com.ibm.itso.ejbRemote.view.HelloRemoteEJBRemote")
private HelloRemoteEJBRemote helloRemoteBean;
Only the interface with the @Local annotation is binding and it is shown in the log. The interface with the @Remote annotation is not getting binded and not shown in the log.
What can be the error?