I am using JDeveloper 9.0.5.2 (Build 1618) for EJB development. I have created an CMP bean called "Sequence" with only local interfaces. and Stateful session bean with remote interfaces called "TestSession". In TestSession, I have added Survey as EJB Local Reference (ejb/local/Survey). The code of the TestSessioBean is as follows:
public class TestSessionBean implements SessionBean {
private SessionContext context;
private SurveyLocalHome surveyLocalHome;
public void ejbCreate() {
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void ejbRemove() {
}
public void setSessionContext(SessionContext ctx) {
this.context = ctx;
try {
surveyLocalHome = getSurveyLocalHome();
} catch (NamingException ne) {
ne.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
}
private SurveyLocalHome getSurveyLocalHome() throws NamingException {
final InitialContext context = new InitialContext();
return (SurveyLocalHome)context.lookup("java:comp/env/ejb/local/Survey");
}
}
In the Embedded OC4J Server Preferences I selected "Look up for all EJB during OC4J Startup".
When I run my application, I got the following error.
--------------------------------------------
Checking that EJBs were successfully deployed in embedded OC4J...
**** Warning: The EJB Survey was not found via an InitialContext lookup. Error encountered: Survey not found.
**** Warning: Not all EJBs were successfully deployed. The EJB application may fail during testing.
**** Please use the EJB Verifier to check your EJB modules for errors by right-clicking on ejb-jar.xml and choosing 'Verify Enterprise Beans'.
------------------------------------------------
After I saw this error message, I did verify enterprise beans and got the following output
Verifying enterprise beans in deployment descriptor D:\My Documents\jdev\testingPurpose\Project\src\META-INF\ejb-jar.xml.
Verifying enterprise bean TestSession.
Verifying EJB home interface D:\My Documents\jdev\testingPurpose\Project\src\Project\TestSessionHome.java.
Verifying EJB interface D:\My Documents\jdev\testingPurpose\Project\src\Project\TestSession.java.
Verifying EJB D:\My Documents\jdev\testingPurpose\Project\src\Project\TestSessionBean.java {1}.
Verifying enterprise bean Survey.
Verifying EJB Local home interface D:\My Documents\jdev\testingPurpose\Project\src\Project\SurveyLocalHome.java.
Verifying EJB Local interface D:\My Documents\jdev\testingPurpose\Project\src\Project\SurveyLocal.java.
Verifying EJB D:\My Documents\jdev\testingPurpose\Project\src\Project\SurveyBean.java {1}.
Verifier completed. 0 Errors, 0 Warnings.
Verification shows no errors. But deployment is not successful. Any kind of configuration needs to be updated to lookup for EJBs successfully?
-
Local Entity Bean lookup failed in oc4j (4 messages)
- Posted by: SVGK Raju
- Posted on: August 31 2004 05:07 EDT
Threaded Messages (4)
- Local Entity Bean lookup failed in oc4j by SVGK Raju on August 31 2004 05:42 EDT
- Local Entity Bean lookup failed in oc4j by Zurdo 1119 on August 31 2004 11:06 EDT
- Local Entity Bean lookup failed in oc4j by Gautham GV on October 10 2004 22:01 EDT
- Local Entity Bean lookup failed in JBoss by Joel Jimenez on November 12 2004 10:39 EST
-
Local Entity Bean lookup failed in oc4j[ Go to top ]
- Posted by: SVGK Raju
- Posted on: August 31 2004 05:42 EDT
- in response to SVGK Raju
Sorry, typo error, Entity bean name is Survey, not Sequence. -
Local Entity Bean lookup failed in oc4j[ Go to top ]
- Posted by: Zurdo 1119
- Posted on: August 31 2004 11:06 EDT
- in response to SVGK Raju
Hi, try:
ejb/Survey
instead of:
ejb/local/Survey -
Local Entity Bean lookup failed in oc4j[ Go to top ]
- Posted by: Gautham GV
- Posted on: October 10 2004 22:01 EDT
- in response to SVGK Raju
Hi Raju,
I have smae problem with JBoss, Please let me know if you have found the solution.
Thanks
Gautham -
Local Entity Bean lookup failed in JBoss[ Go to top ]
- Posted by: Joel Jimenez
- Posted on: November 12 2004 10:39 EST
- in response to Gautham GV
Hi Gautham,
I have smae problem with JBoss, Please let me know if you have found the solution.
Thanks
Joel