在使用axis2做接口的时候,启动tomcat报错,错误详情如下:
2017-10-26 16:52:56 [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:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NullPointerException
at org.apache.axis2.deployment.util.TempFileManager.<clinit>(TempFileManager.java:191)
... 41 more
网络上搜索的各种资料,君得不到解答。在启动tomcat的时候发现了一个严重的错误信息,给我了解决的答。错误信息如下:
Listening for transport dt_socket at address: 1861
2017-10-28 10:58:15 org.apache.catalina.startup.Embedded initDirs
严重: Cannot find specified temporary folder at D:\bytterServices\tomcat_changchengguoruiErpInterface\temp
2017-10-28 10:58:16 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.20.
2017-10-28 10:58:16 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
看到这个【严重】的错误信息,豁然开朗,原来是我再启动tomcat前把tomcat的temp文件夹给删除了,手动添加了temp文件夹后,tomcat正常启动了。
tomcat启动也没有了【严重】的那个错误
Listening for transport dt_socket at address: 1861
2017-10-28 11:04:35 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.20.
2017-10-28 11:04:35 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2017-10-28 11:04:36 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8085
2017-10-28 11:04:36 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8108
2017-10-28 11:04:36 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 801 ms
2017-10-28 11:04:36 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2017-10-28 11:04:36 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.30
2017-10-28 11:04:36 org.apache.catalina.core.StandardHost start
在此记录下来,备忘。