如何在Weblogic 12c中解决Throwable的ClassNotFoundException

时间:2015-01-27 09:13:36

标签: java-ee glassfish weblogic classnotfoundexception throwable

我有一个 J2EE EJB 2.0应用程序,它完全在Glassfish上运行。 我刚刚完成了此应用程序的转换 从Glassfish到Weblogic 12c (Sun Glassfish规范XML到Weblogic规范XML)。 当我将其部署到Weblogic 12c时,服务器日志包含以下内容:

####<Jan 27, 2015 9:50:27 AM CET> <Error> <HTTP> <MY-MACHINE> <my-server> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1422348627543> <BEA-101188> <A bad exception-type exists in web.xml: Throwable.
java.lang.ClassNotFoundException: Throwable
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:335)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:302)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:180)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
    at weblogic.servlet.internal.ErrorManager.registerException(ErrorManager.java:67)
    at weblogic.servlet.internal.ErrorManager.registerErrorPages(ErrorManager.java:89)
    at weblogic.servlet.internal.WebAppServletContext.activateFromDescriptors(WebAppServletContext.java:1101)
    at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:2796)
    at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1648)
    at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:804)
    at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:317)
    at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:313)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:121)
    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:222)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:414)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:191)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:99)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
>

这怎么可能?如何解决丢失的Throwable?为什么在 web.xml

我的 web.xml 以这种方式包含Throwable:

<error-page>
    <exception-type>Throwable</exception-type>
    <location>/error.jsp</location>
</error-page>

为什么Weblogic出错了?

1 个答案:

答案 0 :(得分:0)

这应该是 web.xml

的方式
<error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/error.jsp</location>
</error-page>