This discussion is archived
2 Replies Latest reply: Jan 30, 2013 4:08 AM by 987823 RSS

Problem in deploying EJBs in oc4j

987823 Newbie
Currently Being Moderated
Hi folks,



I am new to ejbs and now I am into support role for ejb2.0 project devoloped long ago. one of the module in that proj has ejb2.0 (Using CMP entity beans & Session beans(stateless))

The problem I am facing currently is , while running the the ejb module (by running a jsp page in that module) I am getting the following error.

In this log I found two things primarily
1) All ejbs are not deployed successfully (due to IntialContext lookup failure)
2) java.lang.NoSuchMethodError while calling the static method of a bean in the jsp
I have cross checked about the second one I didn't find any issue..is there any issue about jar(?) versions and I have run another jsp having no call to that static method then it is worked fine and the jsp view came(but still the first problem is there)


please help me...





[Starting OC4J using the following ports: HTTP=9001, RMI=23904, JMS=9237.]
D:\Robbin_Brothers\jdevstudio10132\jdev\system\oracle.j2ee.10.1.3.40.66\embedded-oc4j\config>
D:\Robbin_Brothers\jdevstudio10132\jdk\bin\javaw.exe -client -classpath D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar;D:\Robbin_Brothers\jdevstudio10132\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config D:\Robbin_Brothers\jdevstudio10132\jdev\system\oracle.j2ee.10.1.3.40.66\embedded-oc4j\config\server.xml
[waiting for the server to complete its initialization...]
Jan 29, 2013 6:48:33 PM com.evermind.server.XMLDataSourcesConfig parseRootNode
INFO: Legacy datasource detected...attempting to convert to new syntax.
Jan 29, 2013 6:48:34 PM com.evermind.server.jms.JMSMessages log
INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
Jan 29, 2013 6:48:34 PM com.evermind.server.jms.JMSMessages log
INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\activation.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/j2ee/home/lib/activation.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\classes12.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/jdbc/lib/ojdbc14dms.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\ejb.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/j2ee/home/lib/ejb.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\jms.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/j2ee/home/lib/jms.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\jsse.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/jdk/jre/lib/jsse.jar (from system property sun.boot.class.path). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\mail.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/j2ee/home/lib/mail.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\servlet.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
WARNING: Code-source D:\Robbin_Brothers\SVN_CHECKOUT_Latest_Sravani\production\project_jars\soap.jar (from <library> in /D:/Robbin_Brothers/jdevstudio10132/jdev/mywork/XXSTS/XXSTS-oc4j-app.xml) has the same filename but is not identical to /D:/Robbin_Brothers/jdevstudio10132/webservices/lib/soap.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Robbin_Brothers\jdevstudio10132\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.root:0.0.0.
13/01/29 18:48:35 WARNING: EJBPackage.parseOrionBean Bean NoReasonType does not exist; skipping deployment
13/01/29 18:48:35 WARNING: EJBPackage.parseOrionBean Bean CompetitorsList does not exist; skipping deployment
13/01/29 18:48:40 Activity: Class 'com.osit.ejb.entity.ActivityLocal' has been updated since last deployment
13/01/29 18:48:40 OccasionTypes: Class 'com.osit.ejb.entity.OccasionTypesLocal' has been updated since last deployment
13/01/29 18:48:40 Rules: Class 'com.osit.ejb.entity.RulesLocal' has been updated since last deployment
13/01/29 18:48:40 Messages: Class 'com.osit.ejb.entity.MessagesLocal' has been updated since last deployment
Jan 29, 2013 6:48:47 PM com.evermind.server.ejb.logging.EJBCompilationMessages infoAutoCreateTable
INFO: [current-workspace-app:XXSTS_XXSTS_0] Auto-creating table: create table STS_ACTIVITY (ACTIVITY_ID NUMBER(22) primary key, ACTIVITY_DATE DATE, CALLBACK_DATE DATE, ACTIVITY_TYPE CHAR(50), STATUS_ID CHAR(50), COMMENTS VARCHAR2(300), NO_REASON_ID CHAR(50), COMPETITOR_ID CHAR(50), CALL_SEQ NUMBER(22), MAIL_SEQ NUMBER(22), EMAIL_SEQ NUMBER(22), FAX_SEQ NUMBER(22), TEXT_SEQ NUMBER(22), PRESENT_SEQ NUMBER(22), PERSON_ID NUMBER(22), CUSTOMER_ID NUMBER(22), OCCASSION CHAR(100), REASON CHAR(100), call_type VARCHAR2(255) null, MAIL_TYPE VARCHAR2(20), INCORRECTCONTACT_TYPE VARCHAR2(20), other_competitor VARCHAR2(500), CSF_NUMBER VARCHAR2(50), IS_COMPLETED CHAR(1)).
13/01/29 18:48:47 Warning: ORA-00955: name is already used by an existing object

Jan 29, 2013 6:48:48 PM com.evermind.server.ejb.logging.EJBCompilationMessages infoAutoCreateTable
INFO: [current-workspace-app:XXSTS_XXSTS_0] Auto-creating table: create table STS_OCCASION_TYPES (OCCASSION_ID CHAR(50) primary key, DESCRIPTION CHAR(200)).
13/01/29 18:48:48 Warning: ORA-00955: name is already used by an existing object

Jan 29, 2013 6:48:49 PM com.evermind.server.ejb.logging.EJBCompilationMessages infoAutoCreateTable
INFO: [current-workspace-app:XXSTS_XXSTS_0] Auto-creating table: create table STS_RULES (RULE_ID NUMBER(22) primary key, OCCASION_ID CHAR(20), OCCASION_STATUS CHAR(2), CONDITION CHAR(20), DAYS NUMBER(22), STATUS NUMBER(22), TYPE CHAR(20)).
13/01/29 18:48:50 Warning: ORA-00955: name is already used by an existing object

Jan 29, 2013 6:48:50 PM com.evermind.server.ejb.logging.EJBCompilationMessages infoAutoCreateTable
INFO: [current-workspace-app:XXSTS_XXSTS_0] Auto-creating table: create table STS_MESSAGES (MSG_ID NUMBER(22) primary key, PERSON_ID NUMBER(22), SUBJECT CHAR(500), DESCRIPTION VARCHAR2(3000), MSG_TO NUMBER(22), READ NUMBER(22)).
13/01/29 18:48:51 Warning: ORA-00955: name is already used by an existing object

Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 22360 ms.

Target URL -- http://192.168.9.66:9001/STS/ActivitySummary.jsp

Checking that EJBs were successfully deployed in embedded OC4J...
13/01/29 18:48:54 Oracle Containers for J2EE 10g (10.1.3.1.1) initialized
**** Warning: The EJB Activity was not found via an InitialContext lookup. Error encountered: Activity not found.
**** Warning: The EJB OccasionTypes was not found via an InitialContext lookup. Error encountered: OccasionTypes not found.
**** Warning: The EJB Rules was not found via an InitialContext lookup. Error encountered: Rules not found.
**** Warning: The EJB Messages was not found via an InitialContext lookup. Error encountered: Messages 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'.
13/01/29 18:48:55 log4j:ERROR Could not open [home/oracle/xmllog4jconfig.xml].
13/01/29 18:48:55 java.io.FileNotFoundException: \home\oracle\xmllog4jconfig.xml (The system cannot find the path specified)
13/01/29 18:48:55      at java.io.FileInputStream.open(Native Method)
13/01/29 18:48:55      at java.io.FileInputStream.<init>(FileInputStream.java:106)
13/01/29 18:48:55      at java.io.FileInputStream.<init>(FileInputStream.java:66)
13/01/29 18:48:55      at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:583)
13/01/29 18:48:55      at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:687)
13/01/29 18:48:55      at com.osit.factory.LoggerFactory.<init>(LoggerFactory.java:19)
13/01/29 18:48:55      at com.osit.factory.LoggerFactory.getInstance(LoggerFactory.java:30)
13/01/29 18:48:55      at Error.<clinit>(Error.java:17)
13/01/29 18:48:55      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
13/01/29 18:48:55      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
13/01/29 18:48:55      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
13/01/29 18:48:55      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
13/01/29 18:48:55      at java.lang.Class.newInstance0(Class.java:350)
13/01/29 18:48:55      at java.lang.Class.newInstance(Class.java:303)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspPageInstFacade.createInst(JspPageInstFacade.java:157)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspPageInstFacade.getInstance(JspPageInstFacade.java:186)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:445)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522)
13/01/29 18:48:55      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:258)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:192)
13/01/29 18:48:55      at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:197)
13/01/29 18:48:55      at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:790)
13/01/29 18:48:55      at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:756)
13/01/29 18:48:55      at ActivitySummary.jspService(_ActivitySummary.java:629)
13/01/29 18:48:55      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522)
13/01/29 18:48:55      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
13/01/29 18:48:55      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
13/01/29 18:48:55      at java.lang.Thread.run(Thread.java:595)
13/01/29 18:48:55 java.lang.NoSuchMethodError: com.osit.bean.Common.getUserDetails(Ljava/lang/String;)Ljava/util/Hashtable;
13/01/29 18:48:55      at ActivitySummary.jspService(_ActivitySummary.java:80)
13/01/29 18:48:55      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598)
13/01/29 18:48:55      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522)
13/01/29 18:48:55      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
13/01/29 18:48:55      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
13/01/29 18:48:55      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
13/01/29 18:48:55      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
13/01/29 18:48:55      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
13/01/29 18:48:55      at java.lang.Thread.run(Thread.java:595)
13/01/29 18:48:55 log4j:WARN No appenders could be found for logger (Error.jsp).
13/01/29 18:48:55 log4j:WARN Please initialize the log4j system properly.
  • 1. Re: Problem in deploying EJBs in oc4j
    dvohra21 Oracle ACE
    Currently Being Moderated
    java.io.FileNotFoundException: \home\oracle\xmllog4jconfig.xml (The system cannot find the path specified)

    The path being relative is not found on the classpath. Add the log4j config file to the classpath.
  • 2. Re: Problem in deploying EJBs in oc4j
    987823 Newbie
    Currently Being Moderated
    Thanks for quick reply dvohra16
    I have checked with the path of xmllog4jconfig.xml which is in classpath.I tried with changing the string in LoggerFactory class
    DOMConfigurator.configure("xmllog4jconfig.xml");
    but still I am facing the same error.
    from where this path "/home/oracle/xmllog4jconfig.xml" is taking I can't understand.....

    error:
    13/01/30 17:31:17 log4j:ERROR Could not open [home/oracle/xmllog4jconfig.xml].
    13/01/30 17:31:17 java.io.FileNotFoundException: \home\oracle\xmllog4jconfig.xml (The system cannot find the path specified)
    13/01/30 17:31:17      at java.io.FileInputStream.open(Native Method)


    My LoggerFactory class:

    import org.apache.log4j.Logger;
    import org.apache.log4j.xml.DOMConfigurator;
    import java.net.URL;

    public class LoggerFactory
    {

    private static LoggerFactory loggerFactory= null;
    private LoggerFactory()
    {
    try{
    DOMConfigurator.configure("xmllog4jconfig.xml");
    }catch (Exception e)
    {
    e.printStackTrace();
    }
    }

         public static LoggerFactory getInstance() {
    if (loggerFactory == null){
    loggerFactory = new LoggerFactory();
    }
    return loggerFactory;
    }
    }

    Thanks,
    Tej

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points