javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
Solution 1
The problem is identified to be confusion over the websocket jars of tomcat and my application jars. I have removed it from the war file and it started working,
I used maven plug in to remove the jars as below,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/websocket-*.jar</packagingExcludes>
</configuration>
</plugin>
The jars which were creating problem are,
Solution 2
Search in pom.xml for
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
and remove it.
Kiran Joshi
About me??? As a stackoverflow user, I would like to talk only technical aspects of me and my life. I always wanted to be a part of IT industry and I used to love watching people developing. "The Black screens", "the infinite text scrolls", "the sleepless nights", "looks which almost goes inside monitors" I complete 6 yrs in IT Industry now and I am loving what I do. More importantly sharing is something that I like to do (A feeling inside myself which tells "You learn more by sharing it"). I have a blog which is dedicated to technical problems and solutions which I have felt sharing with people. I do not want others to suffer the same what I did, here is the link to my http://learnings.joshikiran.com. Please do email me ([email protected]) about any improvements in the blog that I can make for betterment of people.
Updated on June 05, 2022Comments
-
Kiran Joshi almost 2 years
I am facing a problem while deploying a war on to tomcat instance,
Tomcat version details,
D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\bin>version.bat Using CATALINA_BASE: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_HOME: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_TMPDIR: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_07" Using CLASSPATH: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\bin\bootstrap.jar;D:\Kiran\Kiran\Softwares DH\Webservers\apache-to mcat-7.0.63\bin\tomcat-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:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\bin>
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