Hi everyone!!!
I keep getting this exception when trying to deploy a .war app after I've successfully deployed a local EJB .jar.
Caused by: javax.naming.NamingException: ejb-local-ref: 'ejb/Report', with web.xml ejb-link: 'ejb/Report' failed to resolve to an ejb with a LocalHome
Here is my EJB descriptor, which successfully deploys;
<ejb-jar>
<enterprise-beans>
<ejb-name>Report</ejb-name>
<local-home>com.crsoft.crs.services.report.ReportServiceLocalHome</local-home>
com.crsoft.crs.services.report.ReportService
<ejb-class>com.crsoft.crs.services.report.ReportServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>Report</ejb-ref-name>
<local-jndi-name>ejb/Report</local-jndi-name>
</ejb-local-ref>
</enterprise-beans>
</ejb-jar>
and here is my web.xml from my other .war deployed separately. It can't get the handle to the local interface.<web-app>
<display-name>Demo</display-name>
Demo
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<ejb-local-ref>
<ejb-ref-name>ejb/Report</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.crsoft.crs.services.report.ReportServiceLocalHome</local-home>
com.crsoft.crs.services.report.ReportService
<ejb-link>ejb/Report</ejb-link>
</ejb-local-ref>
</web-app>
The classes are correctly implemented.
Any help is greatly needed!!
m
In the <ejb-link> element to reference the bean in the jar you are going to need to include the jar name that contains the bean.
e.g.
<ejb-link>../products/product.jar#ProductEJB</ejb-link>