4
votes

I have successfully deployed an EJB 3 module and a JSF WEB app which calls the EJB module's beans using netbeans IDE locally. Now when I try to deploy this in staging environment, i get the following error:

root cause
javax.servlet.ServletException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.store.managedbeans.CustomerManagedBean/customerService@jndi: com.store.service.CustomerRemote@[email protected]@Session@null into class com.store.managedbeans.CustomerManagedBean
root cause javax.naming.NameNotFoundException: com.store.service.CustomerRemote#com.store.service.CustomerRemote not found

I have deployed the EJB module and Web application in glassfish v2 (in the staging environment).The jar of the EJB Module is inside WEB-INF/lib folder of web application. It looks like the web app cannot find the EJB module. The classes are annotated with @Remote. And I am calling interfaces and not the bean by using @EJB. And of course, this worked find when I deployed it under Netbeans.

1
Found the answer!! The EJB Module was referencing a JMS Queue Connection Factory. I hadn't created that resource in the staging glassfish server. The EJB module was allowed to be deployed. But when I checked the JNDI Log from the console none of the EJBs were bound to any names because of a problem in deploying the module. Hope this helps someone later. I spent about 4+ hours searching the web for this and all I had to do is compare my local server console with staging server console. I did learn a lot more about configurations. - Tesnep

1 Answers

0
votes

From the comments:

The EJB Module was referencing a JMS Queue Connection Factory. The resource hadn't been created in the staging glassfish server. Although the EJB module was allowed to be deployed, the JNDI Log from the console reveals that none of the EJBs were bound to any names because of a problem in deploying the module.