spring - Eclipse Error: Websockets are currently only supported in Tomcat -



spring - Eclipse Error: Websockets are currently only supported in Tomcat -

i'm trying utilize tomcat in webapp , want utilize spring’s back upwards embedding tomcat servlet container http runtime, instead of deploying external instance in tutorial basing app off of: http://spring.io/guides/gs/messaging-stomp-websocket/

however, getting stack error:

caused by: java.lang.illegalstateexception: websockets supported in tomcat (found class org.springframework.boot.context.embedded.jetty.jettyembeddedservletcontainerfactory). @ org.springframework.boot.autoconfigure.websocket.websocketautoconfiguration$1.customize(websocketautoconfiguration.java:74) @ org.springframework.boot.context.embedded.embeddedservletcontainercustomizerbeanpostprocessor.postprocessbeforeinitialization(embeddedservletcontainercustomizerbeanpostprocessor.java:67) @ org.springframework.boot.context.embedded.embeddedservletcontainercustomizerbeanpostprocessor.postprocessbeforeinitialization(embeddedservletcontainercustomizerbeanpostprocessor.java:54) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applybeanpostprocessorsbeforeinitialization(abstractautowirecapablebeanfactory.java:407) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1545) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:539) ... 16 more

i'm not sure how it's happening , not in spring example. here pom:

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <modelversion>4.0.0</modelversion> <groupid>org.springframework</groupid> <artifactid>gs-messaging-stomp-websocket</artifactid> <version>0.1.0</version> <url>http://www.springframework.org</url> <properties> <maven.test.failure.ignore>true</maven.test.failure.ignore> <spring.framework.version>3.0.6.release</spring.framework.version> </properties> <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.1.1.release</version> </parent> <repositories> <repository> <id>spring-snapshots</id> <url>http://repo.spring.io/libs-snapshot</url> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginrepositories> <pluginrepository> <id>spring-snapshots</id> <url>http://repo.spring.io/libs-snapshot</url> <snapshots><enabled>true</enabled></snapshots> </pluginrepository> </pluginrepositories> <dependencies> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-websocket</artifactid> <version>1.1.1.release</version> <exclusions> <exclusion> <artifactid>log4j-over-slf4j</artifactid> <groupid>org.slf4j</groupid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-messaging</artifactid> <version>4.0.5.release</version> </dependency> <dependency> <groupid>org.apache.activemq</groupid> <artifactid>activemq-all</artifactid> <version>5.10.0</version> </dependency> <dependency> <groupid>org.apache.camel</groupid> <artifactid>camel-core</artifactid> <version>2.13.1</version> </dependency> <dependency> <groupid>org.apache.directory.studio</groupid> <artifactid>org.apache.commons.pool</artifactid> <version>1.6</version> </dependency> <dependency> <groupid>org.apache.camel</groupid> <artifactid>apache-camel</artifactid> <version>2.13.1</version> <type>pom</type> </dependency> <dependency> <groupid>jdk.tools</groupid> <artifactid>jdk.tools</artifactid> <scope>system</scope> <version>1.6</version> <systempath>c:\program files\java\jdk1.8.0_05\lib\tools.jar</systempath> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-security</artifactid> <version>1.1.1.release</version> </dependency> <dependency> <groupid>org.eclipse.jetty</groupid> <artifactid>jetty-webapp</artifactid> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-websocket</artifactid> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-autoconfigure</artifactid> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-test</artifactid> </dependency> </dependencies> <build> <plugins> <plugin> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> </plugin> <plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> </plugin> </plugins> </build>

i have of dependencies spring illustration uses. factors impact application's ability utilize tomcat?

thanks in advance help!

edit:

here application.class:

package hello; import org.springframework.boot.autoconfigure.enableautoconfiguration; import org.springframework.boot.springapplication; import org.springframework.context.annotation.componentscan; import org.springframework.stereotype.component; @component @enableautoconfiguration public class application { public static void main(string[] args) { springapplication.run(application.class, args); } }

here main:

package com.example.integration; import hello.*; import org.apache.camel.producertemplate; import org.springframework.context.applicationcontext; import org.springframework.context.support.classpathxmlapplicationcontext; public class testcamelspring { public static void main(string[] args) { applicationcontext context = new classpathxmlapplicationcontext("camelspring.xml"); producertemplate cameltemplate = context.getbean("cameltemplate", producertemplate.class); application.main(args); system.out.println("message sending started"); cameltemplate.sendbody("jms:queue:testqsource","sample message"); system.out.println("message sent"); }

}

eclipse spring maven tomcat

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -