讨论区 » AAS-V10企业版 »
org.apache.catalina.LifecycleException: java.lang.RuntimeException: Servlet web service endpoint '' failure
由 彭 博 在 大约 3 年 之前添加
问题 –java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: Servlet web service endpoint '' failure¶
问题描述¶
项目在打包过程中将server-api.jar包打进去了,导致冲突
Exception during lifecycle processing
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: Servlet web service endpoint '' failure
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:112)
at com.apusic.aas.internal.data.EngineRef.start(EngineRef.java:98)
at com.apusic.aas.internal.data.ModuleInfo.start(ModuleInfo.java:267)
at com.apusic.aas.internal.data.ApplicationInfo.start(ApplicationInfo.java:331)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:478)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:196)
at com.apusic.aas.deployment.admin.DeployCommand.execute(DeployCommand.java:492)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:518)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:514)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:513)
排查过程¶
查看日志。
解决办法¶
要解决此问题,请将范围设置为provided 。 这告诉Maven仅将代码servlet-api.jar用于编译和测试,而不将其包括在WAR文件中。 部署的容器将在运行时“提供” servlet-api.jar 。
pom.xml
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>