validateJarFile没有加载tomcat-embed-core-8.0.20.jar jar。请参阅Servlet规范2.3,第9.7.2节。违规类:javax / servlet / Servlet.class

时间:2015-06-08 10:23:01

标签: java spring apache spring-boot

将以下依赖项添加到我的pom.xml

之后
<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
             <version>1.2.3.RELEASE</version>
</dependency>

我收到以下错误:

Jun 08, 2015 3:44:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.
Jun 08, 2015 3:44:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jun 08, 2015 3:44:56 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
Jun 08, 2015 3:44:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jun 08, 2015 3:44:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jun 08, 2015 3:44:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1579 ms
Jun 08, 2015 3:44:56 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 08, 2015 3:44:56 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Jun 08, 2015 3:44:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache7\webapps\RetailExecution-0.0.1-SNAPSHOT.war
Jun 08, 2015 3:44:59 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\apache7\webapps\RetailExecution-0.0.1-SNAPSHOT\WEB-INF\lib\tomcat-embed-core-8.0.20.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Jun 08, 2015 3:44:59 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\apache7\webapps\RetailExecution-0.0.1-SNAPSHOT\WEB-INF\lib\tomcat-embed-el-8.0.20.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
Jun 08, 2015 3:45:04 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing AtmosphereFramework
Jun 08, 2015 3:45:05 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RetailExecution-0.0.1-SNAPSHOT]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
    at org.apache.tomcat.websocket.server.WsServerContainer.<init>(WsServerContainer.java:147)
    at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 10 more

Jun 08, 2015 3:45:05 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive C:\apache7\webapps\RetailExecution-0.0.1-SNAPSHOT.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RetailExecution-0.0.1-SNAPSHOT]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Jun 08, 2015 3:45:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\docs
Jun 08, 2015 3:45:05 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [133] milliseconds.
Jun 08, 2015 3:45:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\examples
Jun 08, 2015 3:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 08, 2015 3:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 08, 2015 3:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@7fae2e6b')
Jun 08, 2015 3:45:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\forecastInseasonexcel
Jun 08, 2015 3:45:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\forecaststatusexcel
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\forecaststoreexcel
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\host-manager
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\images
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\manager
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache7\webapps\ROOT
Jun 08, 2015 3:45:06 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jun 08, 2015 3:45:06 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jun 08, 2015 3:45:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10153 ms

我尝试了很多来确定问题。但是我不能。请帮我解决这个问题。提前谢谢。

0 个答案:

没有答案