Friday, 25 November 2016

OAF: java.lang.NoClassDefFoundError: Could not initialize class oracle.apps.fnd.common.WebAppsContext

Error while trying to run a custom OA Page from Jdeveloper:
 500 Internal Server Error  
 java.lang.NoClassDefFoundError: Could not initialize class oracle.apps.fnd.common.WebAppsContext  
      at oracle.apps.fnd.framework.server.OAUtility.getWebAppsContext(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAServerDelegate.getWebAppsContext(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAJSPHelper.handleErrorStackDisplay(Unknown Source)  
      at _OAErrorPage._jspService(_OAErrorPage.java:135)  
      [/OAErrorPage.jsp]  
      at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.5.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)  
      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)  
      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)  
      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)  
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:280)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:68)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:214)  
      at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:219)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:871)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:816)  
      at _runregion._jspService(_runregion.java:193)  
      [/runregion.jsp]  
      at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.5.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)  
      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)  
      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)  
      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)  
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)  
      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)  
      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)  
      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)  
      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)  
      at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)  
      at java.lang.Thread.run(Thread.java:662)  


In my case :

Problem : The dbc file was old and not updated.  

Solution : Get the latest dbc file from the server and copy it to your local folder and refer that in the Project properties. [Also verify the JDBC string in the DBC file and compare the database connection in Jdeveloper Database Connections window]

To get the location of dbc file in the server :

1. Navigate to any of the OA Page in the application.
2. Click on the 'About this page' link at the bottom.
3. Select the tab 'Java System Properties'.
 



Feel free to point out if anything is missing/wrong in this blog.



No comments:

Post a Comment