Class 尝试在轴 2 中部署模块时抛出异常:OS:Linux,Tomcat Version:8
Class cast Exception while trying to deploy the Modules in axis 2 : OS: Linux , Tomcat Version:8
当我尝试启动 tomcat 时,在部署 axis2 模块时,我收到 class 强制转换异常 。
我启用了 EnableChildfirstClassLoading 属性。当我检查 classloading(using -verbose) 时,一些 classes 被加载了两次。
例如[Loaded org.apache.axis2.engine.MessageReceiver from file:/irv_test/cipsm/SecureLinkTestingNEW/SLInstaller1/app4.0/tomcat/webapps/axis2/WEB-INF/lib/axis2-kernel-1.6.2.jar]
此 class 从同一 jar 位置加载两次。
轴版本:1.6.2
Tomcat: 8
OS: 红帽 Linux
跟踪如下:
[ERROR] The soapmonitor-1.6.2.mar module, which is not valid, caused org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module
org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:527)
at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:77)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:69)
at org.apache.axis2.deployment.RepositoryListener.(RepositoryListener.java:64)
at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:228)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module
at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:233)
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:514)
... 31 more
Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module
at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:86)
at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:121)
... 32 more
Caused by: java.lang.ClassCastException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module
at org.apache.axis2.deployment.ModuleBuilder.run(ModuleBuilder.java:76)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:74)
... 33 more`
EnableChildFirstClassLoading
在 Axis2 1.6.2 和 1.6.3 中被破坏。参见 AXIS2-5720。
当我尝试启动 tomcat 时,在部署 axis2 模块时,我收到 class 强制转换异常 。
我启用了 EnableChildfirstClassLoading 属性。当我检查 classloading(using -verbose) 时,一些 classes 被加载了两次。
例如[Loaded org.apache.axis2.engine.MessageReceiver from file:/irv_test/cipsm/SecureLinkTestingNEW/SLInstaller1/app4.0/tomcat/webapps/axis2/WEB-INF/lib/axis2-kernel-1.6.2.jar]
此 class 从同一 jar 位置加载两次。
轴版本:1.6.2
Tomcat: 8
OS: 红帽 Linux
跟踪如下:
[ERROR] The soapmonitor-1.6.2.mar module, which is not valid, caused org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:527) at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:77) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813) at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264) at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:69) at org.apache.axis2.deployment.RepositoryListener.(RepositoryListener.java:64) at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158) at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:228) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454) at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:233) at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:514) ... 31 more Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:86) at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:121) ... 32 more Caused by: java.lang.ClassCastException: org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule cannot be cast to org.apache.axis2.modules.Module at org.apache.axis2.deployment.ModuleBuilder.run(ModuleBuilder.java:76) at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132) at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:74) ... 33 more`
EnableChildFirstClassLoading
在 Axis2 1.6.2 和 1.6.3 中被破坏。参见 AXIS2-5720。