尝试在轴2中部署模块时出现类异常:操作系统:Linux,Tomcat版本:8

时间:2015-09-24 07:02:17

标签: axis2 classcastexception tomcat8

当我尝试启动tomcat时,在部署axis2模块时,我得到类强制转换异常

我启用了 EnableChildfirstClassLoading 属性。当我检查类加载(使用-verbose)时,一些类被加载两次 例如[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]

此类从同一个jar位置加载两次。

轴版本:1.6.2
雄猫:8
操作系统:Redhat Linux

以下是跟踪:

  

[错误] soapmonitor-1.6.2.mar模块无效,导致org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule无法转换为org.apache.axis2.modules.Module   org.apache.axis2.deployment.DeploymentException:org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule无法强制转换为org.apache.axis2.modules.Module       at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:527)       在org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:77)       在org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)       在org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)       在org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)       at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:69)       在org.apache.axis2.deployment.RepositoryListener。(RepositoryListener.java:64)       在org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)       在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)       在org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)       在org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)       在org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)       在org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)       在org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)       在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)       在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)       在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)       在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)       在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)       at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:659)       在org.apache.coyote.http11.Http11NioProtocol $ Http11ConnectionHandler.process(Http11NioProtocol.java:223)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1558)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1515)       在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)       在java.lang.Thread.run(Thread.java:745)   引起:org.apache.axis2.deployment.DeploymentException:org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule无法强制转换为org.apache.axis2.modules.Module       在org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:233)       在org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:514)       ......还有31个   引起:org.apache.axis2.deployment.DeploymentException:org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule无法强制转换为org.apache.axis2.modules.Module       在org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:86)       在org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:121)       ......还有32个   引起:java.lang.ClassCastException:org.apache.axis2.handlers.soapmonitor.SOAPMonitorModule无法强制转换为org.apache.axis2.modules.Module       在org.apache.axis2.deployment.ModuleBuilder $ 1.run(ModuleBuilder.java:76)       在org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)       在org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:74)       ......还有33个。

1 个答案:

答案 0 :(得分:0)

在Axis2 1.6.2和1.6.3中,

EnableChildFirstClassLoading已被破坏。请参阅AXIS2-5720