Search code examples
servletsweblogicoracle-adfjdeveloperjava-6

Java Application Runs on Production, but not on Local Weblogic Server


For security/privacy issues, the application name has been replaced with ~application~; there are 5 projects within the application: the first project name has been replaced with ~project1~, all other project names have stayed unchanged, Model, RM-Model, ViewController, and WebServices. File location username has been replaced with ~user~. Packages and maps have been replaced with ~package~.~map~; credential name has been replaced with ~credential~; and webapp name has been replaced with ~webapp-name~. All other names i.e. classes, servers, symbols, and methods within the error log have remained unchanged.

All libraries, methods, servlets, actual application and project names are present on a production server, also, no compilation errors are present during the build process. This error only exists once the application reaches the deployment stage of the build process.

There are limits in place, Java JDK 1.6, JDeveloper 11g, and Weblogic 10.3; there are a few others, not related to this issue. Below is the console log during the build:

[Running application ~application~ on Server Instance IntegratedWebLogicServer...]

[05:51:50 AM] Web Module ~project1~WebApp.war recognized in project ~project1~.jpr

[05:51:50 AM] EJB Module ModelEJB.jar recognized in project Model.jpr

[05:51:50 AM] EJB Module RM-ModelEJB.jar recognized in project RM-Model.jpr

[05:51:50 AM] Web Module ViewControllerWebApp.war recognized in project ViewController.jpr

[05:51:50 AM] Web Module WebServicesWebApp.war recognized in project WebServices.jpr

[05:51:50 AM] ---- Deployment started. ----

[05:51:50 AM] Target platform is (Weblogic 10.3).

[05:51:53 AM] Retrieving existing application information

[05:51:53 AM] Running dependency analysis...

[05:51:53 AM] Deploying 6 profiles...

[05:51:54 AM] Wrote Web Application Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~\WebServicesWebApp.war

[05:52:12 AM] Wrote Web Application Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~\ViewControllerWebApp.war

[05:52:12 AM] Wrote EJB Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~\RM-ModelEJB.jar

[05:52:12 AM] Wrote EJB Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~\ModelEJB.jar

[05:52:12 AM] Wrote Web Application Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~\~project1~WebApp.war

[05:52:13 AM] Warning: Unresolved element deleted from application.xml

[05:52:13 AM] Warning: Unresolved element deleted from application.xml

[05:52:13 AM] Warning: Unresolved element deleted from application.xml

[05:52:13 AM] Warning: Unresolved element deleted from application.xml

[05:52:13 AM] Warning: Unresolved element deleted from application.xml

[05:52:13 AM] Wrote Enterprise Application Module to C:\Users\~user~\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\o.j2ee\drs\~application~

[05:52:13 AM] Deploying Application...

Cannot migrate credential folder/key ~application~.~package~.~map~/anonymous#~credential~.Reason oracle.security.jps.service.credstore.CredentialAlreadyExistsException: JPS-01007: The credential with map ~application~.~package~.~map~ and key anonymous#~credential~ already exists..

Cannot migrate credential folder/key ~application~.~package~.~map~/anonymous#local.Reason oracle.security.jps.service.credstore.CredentialAlreadyExistsException: JPS-01007: The credential with map ~application~.~package~.~map~ and key anonymous#local already exists..

'weblogic.application.ModuleException: Failed to load webapp: '~webapp-name~-context-root''

weblogic.application.ModuleException: Failed to load webapp: '~webapp-name~-context-root'

at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)

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: ~package~.~map~.SearchServlet

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:305)

at java.lang.ClassLoader.loadClass(ClassLoader.java:246)

Truncated. see log file for complete stacktrace >

weblogic.application.ModuleException: Failed to load webapp: '~webapp-name~-context-root'

at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)

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: ~package~.~map~.SearchServlet

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:305)

at java.lang.ClassLoader.loadClass(ClassLoader.java:246)

Truncated. see log file for complete stacktrace >

[05:52:18 AM] Deployment cancelled.

[05:52:18 AM] ---- Deployment incomplete ----.

[05:52:18 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

Cannot run application ~application~ due to error deploying to IntegratedWebLogicServer.

[Application ~application~ stopped and undeployed from Server Instance IntegratedWebLogicServer]

My question is, how do I resolve this issue, the SearchServlet exists in the first project and there are no compilation errors and no other hangups during the run sequence until it actually reached the deployment stage. Also on the admin console for the Weblogic server, the application shows up as a failed deployment but clears away during next attempted build. Thank you in advance for any help getting this application to successfully run.

Compiling 4 sources

Compiling ~\TransferServlet.java

Compiling ~\SearchServlet.java

Compiling ~\~servlet1~.java

Compiling ~\~servlet2~.java

Writing ~\TransferServlet.class

Writing ~\~servlet1~.class

Writing ~\SearchServlet.class

Writing ~\~servlet2~.class

[7:47:42 AM] Appc compilation begin

Compiling out of process...

[7:47:45 AM] Appc compilation end

Nothing to build.

Nothing to build.

[7:47:46 AM] Appc compilation begin

Compiling out of process...

[7:47:50 AM] Appc compilation end

[7:47:50 AM] Successful compilation: 0 errors, 0 warnings.


Solution

  • Caused By: java.lang.ClassNotFoundException: ~package~.~map~.SearchServlet

    Your application is missing a SearchServlet.class .