带有tomcat和axis2

时间:2016-02-17 22:10:27

标签: java android apache tomcat

我是tomcat / axis2的新手。我已经单独安装并测试了tomcat并正常工作。但是当我把tomcat和axis2遇到这个错误时。有人能帮助我吗?

  

java.lang.NoClassDefFoundError:org / apache / ws / commons / schema / resolver / URIResolver       在org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:128)       在org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:144)       在org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)       在org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)       在org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:66)       在org.apache.axis2.deployment.RepositoryListener。(RepositoryListener.java:61)       在org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:152)       在org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:233)       at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)       at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)       在org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)       在org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)       在org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)       在org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)       在org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:828)       在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:502)       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)       在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)       在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)       at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:672)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1500)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1456)       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)       at org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)       在java.lang.Thread.run(未知来源)   引起:java.lang.ClassNotFoundException:org.apache.ws.commons.schema.resolver.URIResolver       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)       ......还有31个

     

2016年6月17日下午6:59:39 org.apache.catalina.core.StandardWrapperValve调用   SEVERE:为servlet AxisServlet分配异常   java.lang.ClassNotFoundException:org.apache.ws.commons.schema.resolver.URIResolver       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)       在org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:128)       在org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:144)       在org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)       在org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)       在org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:66)       在org.apache.axis2.deployment.RepositoryListener。(RepositoryListener.java:61)       在org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:152)       在org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:233)       at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)       at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)       在org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)       在org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)       在org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)       在org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)       在org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:828)       在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:502)       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)       在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)       在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)       at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:672)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1500)       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1456)       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)       at org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)       在java.lang.Thread.run(未知来源)

1 个答案:

答案 0 :(得分:0)

当Tomcat在正确的位置找不到文件时,java.lang.NoClassDefFoundError:发生了。要解决此问题,请确保:

  1. 你必须设置CATALINA_HOME& JAVA_HOME变量
  2. 在TOMCAT_HOME / webapps / your-project-directory中添加项目html,jsp,css,images等文件
  3. 在TOMCAT_HOME / webapps / your-project-directory / WEB-INF / classes
  4. 中添加java类
  5. 将您的Java库放在TOMCAT_HOME / webapps / your-project-directory / WEB-INF / lib
  6. 确保在web.xml(部署描述符)中编写了所有类