Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Websocket on Virgo Tomcat Server(Websocket on Virgo Tomcat Server)
Websocket on Virgo Tomcat Server [message #1266774] Fri, 07 March 2014 18:51 Go to next message
QQ Wang is currently offline QQ Wang
Messages: 2
Registered: March 2014
Junior Member
I am new to websocket as well as virgo tomcat server. Are there any examples of websocket application that runs with Virgo tomcat server? Thanks and appreciated.
Re: Websocket on Virgo Tomcat Server [message #1268182 is a reply to message #1266774] Mon, 10 March 2014 02:49 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta Georgieva
Messages: 234
Registered: October 2010
Senior Member
Hi,
In Virgo 3.6.x we still use Tomcat with a websocket implementation that does not cover JSR 356.
As an example app you can use Tomcat examples. Here [1] you can find some description. Note that Virgo uses Gemini Web so the description can be applied to Virgo as well.
Regards,
Violeta

[1] http://www.eclipse.org/forums/index.php/m/1073855/#msg_1073855
Re: Websocket on Virgo Tomcat Server [message #1272036 is a reply to message #1268182] Sun, 16 March 2014 19:26 Go to previous messageGo to next message
QQ Wang is currently offline QQ Wang
Messages: 2
Registered: March 2014
Junior Member
Hi Violeta,

Thanks for the reply. I downloaded spring-websocket-portfolio websocket application (Spring4) from github and it works fine with Virgo 3.6.2

Due to some restrictions, we can only use regular websocket not SockJS. After removing SockJS from above app, it still runs fine on Tomcat 7.0.52 but no longer on Virgo 3.6.2. I got the following exception: "java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found"

This is what I found from Spring documentation: "A container-specific RequestUpgradeStrategy is required since standard Java WebSocket currently does not provide a way to initiate a WebSocket handshake. Currently available are implementations for Tomcat and GlassFish"

It seems the current availability is in Tomcat 7.0.52 but Virgo 3.6.2 is still using Tomcat 7.0.35. I also tried it on Virgo 3.7.0M01, got the same exception.

So my question is:
1. How can I get around this?
2. Is the 7.0.52 will be supported on Virgo soon?

Thanks very much for the help!

Attached is the exception:
==============
root cause

java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found
org.springframework.web.socket.server.support.DefaultHandshakeHandler.initRequestUpgradeStrategy(DefaultHandshakeHandler.java:107)
org.springframework.web.socket.server.support.DefaultHandshakeHandler.<init>(DefaultHandshakeHandler.java:89)
org.springframework.web.socket.server.support.WebSocketHttpRequestHandler.<init>(WebSocketHttpRequestHandler.java:63)
org.springframework.web.socket.config.annotation.WebMvcStompWebSocketEndpointRegistration.getMappings(WebMvcStompWebSocketEndpointRegistration.java:96)
org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry.getHandlerMapping(WebMvcStompEndpointRegistry.java:109)
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.stompWebSocketHandlerMapping(WebSocketMessageBrokerConfigurationSupport.java:47)
org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpringCGLIB$$2345c51a.CGLIB$stompWebSocketHandlerMapping$6(<generated>)
org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpringCGLIB$$2345c51a$$FastClassBySpringCGLIB$$d3d489cf.invoke(<generated>)
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:312)
org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpringCGLIB$$2345c51a.stompWebSocketHandlerMapping(<generated>)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166)
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:580)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:244)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.eclipse.virgo.web.tomcat.support.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:33)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:744)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.35 logs.

Re: Websocket on Virgo Tomcat Server [message #1274198 is a reply to message #1272036] Fri, 21 March 2014 01:27 Go to previous message
Violeta Georgieva is currently offline Violeta Georgieva
Messages: 234
Registered: October 2010
Senior Member
Hi,

See http://www.eclipse.org/forums/index.php/t/672501/

Regards,
Violeta
Previous Topic:Spring Java Based Configuration
Next Topic:3.5.0.M04 Cannot determine the artifact identity of the file
Goto Forum:
  


Current Time: Fri Aug 29 20:35:57 EDT 2014

Powered by FUDForum. Page generated in 0.02426 seconds