The addressing-1.5.mar module, which is not valid, caused null java.lang.ExceptionInInitializerError

歐浪發表於2020-12-03

用axis2做介面發現的一個問題,在開發中我自己專案啟動沒問題,然後把web專案包給實施啟動點選介面服務列表檢視的時候報錯,實施給我的報錯日記資訊如下:

2020-12-03 14:49:56 [org.apache.axis2.deployment.ModuleDeployer]-[ERROR] The axis2-scripting-1.5.mar module, which is not valid, caused Could not initialize class org.apache.axis2.deployment.util.TempFileManager
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.deployment.util.TempFileManager
	at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:224)
	at org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:165)
	at org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:899)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
	at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:65)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:663)
	at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:251)
	at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:68)
	at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:63)
	at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:147)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:229)
	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:610)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
	at java.lang.Thread.run(Thread.java:722)
2020-12-03 14:49:56 [org.apache.axis2.deployment.ModuleDeployer]-[ERROR] The mex-1.5.mar module, which is not valid, caused Could not initialize class org.apache.axis2.deployment.util.TempFileManager
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.deployment.util.TempFileManager
	at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:224)
	at org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:165)
	at org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:899)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
	at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:65)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:663)
	at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:251)
	at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:68)
	at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:63)
	at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:147)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:229)
	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:610)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
	at java.lang.Thread.run(Thread.java:722)

對於小菜雞的我,之前以為是axis2包的問題,經排查包是沒問題的,後續又排查了jdk版本和tomcat版本也沒問題,後續再把實施的資料庫導過來經驗證也不是資料庫的問題。。。。整得挺懵逼的,後續自己單獨用tomcat啟動發現啟動的時候就報錯了,下面是啟動報錯日記:

2020-12-03 18:10:33 [org.apache.axis2.deployment.ClusterBuilder]-[INFO] Clustering has been disabled
2020-12-03 18:10:33 [org.apache.axis2.deployment.ModuleDeployer]-[ERROR] The addressing-1.5.mar module, which is not valid, caused null
java.lang.ExceptionInInitializerError
	at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:224)
	at org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:165)
	at org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:899)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
	at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:65)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:663)
	at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:251)
	at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:68)
	at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:63)
	at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:147)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:229)
	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4491)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4808)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:676)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:602)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:503)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:761)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
	at org.apache.axis2.deployment.util.TempFileManager.<clinit>(TempFileManager.java:191)
	... 41 more
2020-12-03 18:10:33 [org.apache.axis2.deployment.ModuleDeployer]-[ERROR] The axis2-jaxws-mar-1.5.mar module, which is not valid, caused Could not initialize class org.apache.axis2.deployment.util.TempFileManager
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.deployment.util.TempFileManager
	at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:224)
	at org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:165)
	at org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:899)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
	at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:65)
	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:663)
	at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:251)
	at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:68)
	at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:63)
	at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:147)
	at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:229)
	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4491)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4808)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:676)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:602)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:503)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:761)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

後續通過啟動報錯資訊參考到博主文章地址:https://blog.csdn.net/qq_32384249/article/details/78374046

發現是tomcat少了temp資料夾,然後axis2去生成東西的時候找不到目錄所以生成不了檔案導致的問題,有些人的報錯資訊會明顯一點,會有一個這樣的提示:

嚴重: Cannot find specified temporary folder at D:\bytterServices\tomcat_changchengguoruiErpInterface\temp

大意了,剛開始的時候沒有讓實施給我完整的日記進行排查。
特此記錄一下!

相關文章