A lookup of a local Bean as follows:
<%
Context context = new InitialContext();
jdevpackage.hrAppEJBLocalHome hrapphome = (jdevpackage.hrAppEJBLocalHome)context.lookup("java:comp/env/ejb/hrAppEJB");
// Create local object
jdevpackage.hrAppEJBLocal hrapp = (jdevpackage.hrAppEJBLocal)hrapphome.create();
%>
where the web.xml contains the reference of the bean as follows:
<ejb-ref>
<ejb-ref-name>hrApp</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>jdevpackage.hrAppEJBHome</home>
<remote>jdevpackage.hrAppEJB</remote>
</ejb-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/hrAppEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>jdevpackage.hrAppEJBLocalHome</local-home>
<local>jdevpackage.hrAppEJBLocal</local>
</ejb-local-ref>
gives the following
Java exception:
javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance of the type 'jdevpackage.hrAppEJB' found for the ejb-ref hrApp
I am using oc4j and jdeveloper for deployment.