Problem while deploying Oracle ADF application - java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet
Sometimes we may receive the following exception while
deploying the Oracle ADF application to the server.
weblogic.application.ModuleException:
Failed to load webapp: 'BAPReport.war'
at
weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:395)
at
weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at
weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
Truncated. see log file for complete
stacktrace
Caused By:
java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Truncated. see log file for complete
stacktrace
The issue is the oracle.adf.library.webapp.ResourceServlet
class is missing in the class path.This issue can be resolved by deploying
the application as EAR file instead of deploying the project as WAR file.
Steps to resolve the issue:
- Right click on the application and select Application properties
- Select Deployment and click on New