Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
784 views
in Technique[技术] by (71.8m points)

java - javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable

I am facing a problem while deploying a war on to tomcat instance,

Tomcat version details,

D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63in>version.bat
Using CATALINA_BASE:   "D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63"
Using CATALINA_HOME:   "D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63"
Using CATALINA_TMPDIR: "D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63emp"
Using JRE_HOME:        "C:Program FilesJavajdk1.7.0_07"
Using CLASSPATH:       "D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63inootstrap.jar;D:KiranKiranSoftwares DHWebserversapache-to
mcat-7.0.63inomcat-juli.jar"
Server version: Apache Tomcat/7.0.63
Server built:   Jun 30 2015 08:08:33 UTC
Server number:  7.0.63.0
OS Name:        Windows 7
OS Version:     6.1
Architecture:   amd64
JVM Version:    1.7.0_07-b11
JVM Vendor:     Oracle Corporation
D:KiranKiranSoftwares DHWebserversapache-tomcat-7.0.63in>

POM Dependency :

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

I have created a war using maven plugin and tried to deploy on tomcat 7. I was able to deploy but unable to start the webapp. When I find the logs for it, it gave below stacktrace,

SEVERE: Error during ServletContainerInitializer processing
javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
    at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:146)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5520)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
    at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:694)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

Any help would be appreciated. Thank you.


Edit :

It runs fine when I run the application using STS

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Search in pom.xml for

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

and remove it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...