Java 应用程序在生产环境中运行,但不在本地 Weblogic 服务器上运行

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

对于security/privacy问题,应用程序名称已替换为~application~;应用程序中有 5 个项目:第一个项目名称已替换为 ~project1~,所有其他项目名称保持不变,Model、RM-Model、ViewController 和 WebServices。文件位置用户名已替换为 ~user~。包和地图已替换为 ~package~.~map~;凭据名称已替换为 ~credential~;并且 webapp 名称已替换为 ~webapp-name~。错误日志中的所有其他名称,即 类、服务器、符号和方法均保持不变。

所有库、方法、servlet、实际应用程序和项目名称都存在于生产服务器上,而且在构建过程中不存在编译错误。此错误仅在应用程序到达构建过程的部署阶段后才存在。

存在限制,Java JDK 1.6、JDeveloper 11g 和 Weblogic 10.3;还有一些其他的,与这个问题无关。以下是构建期间的控制台日志:

[运行 服务器实例 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.next(DeploymentCallbackFlow.java:517)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

Truncated. see log file for complete stacktrace

原因: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: 无法加载 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.next(DeploymentCallbackFlow.java:517)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

Truncated. see log file for complete stacktrace

原因: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] 部署已取消。

[05:52:18 AM] ---- 部署未完成 ----。

[05:52:18 AM] 远程部署失败(oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

由于部署到 IntegratedWebLogicServer 时出错,无法 运行 应用程序 ~application~。

[应用程序 ~application~ 停止并从服务器实例 IntegratedWebLogicServer 取消部署]

我的问题是,我该如何解决这个问题,SearchServlet 存在于第一个项目中,在 运行 序列期间没有编译错误,也没有其他挂起,直到它实际到达部署阶段。同样在 Weblogic 服务器的管理控制台上,该应用程序显示为部署失败,但在下一次尝试构建时会清除。在此先感谢您帮助成功完成此应用程序 运行。

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 编译开始

进程外编译...

[7:47:45 AM] Appc 编译结束

Nothing to build.

Nothing to build.

[7:47:46 AM] Appc 编译开始

进程外编译...

[7:47:50 AM] Appc 编译结束

[7:47:50 AM] 编译成功:0 个错误,0 个警告。

原因:java.lang.ClassNotFoundException:~package~.~map~.SearchServlet

您的应用程序缺少 SearchServlet.class .