2015-07-02 62 views
1

我是openshift的新手,目前嘗試在那裏設置我的websocket應用程序,但有一些問題。當我試圖連接到openshift + spring websocket

WS://app-domain.rhcloud.com:8000 /路徑

我得到以下異常:

Caused by: java.lang.IllegalArgumentException: No 'javax.websocket.server.Server Container' ServletContext attribute. Are you running in a Servlet container that 
supports JSR-356? 
    at org.springframework.util.Assert.notNull(Assert.java:112) 
    at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getContainer(AbstractStandardUpgradeStrategy.java:68) 
    at org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy.getContainer(TomcatRequestUpgradeStrategy.java:83) 
    at org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy.getContainer(TomcatRequestUpgradeStrategy.java:46) 
    at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getSupportedExtensions(AbstractStandardUpgradeStrategy.java:88) 
    at org.springframework.web.socket.server.support.DefaultHandshakeHandler.doHandshake(DefaultHandshakeHandler.java:214) 
    at org.springframework.web.socket.server.support.WebSocketHttpRequestHandler.handleRequest(WebSocketHttpRequestHandler.java:127) 
    ... 25 more 

當我運行的應用程序當地一切正常與下列網址:

WS://本地主機:8090 /路徑

對於這兩種情況下,我使用Tomcat 7 Spring配置:

<websocket:handlers allowed-origins="*"> 
    <websocket:mapping path="/fight-core" handler="webSocketHandler"/> 
    <websocket:handshake-interceptors> 
     <ref bean="webSocketHandshakeInterceptor"/> 
    </websocket:handshake-interceptors> 
</websocket:handlers> 

而且我已經在我的pom.xml和W與WebSocket的-API的依賴嘗試/ O它

Kidnly建議

回答

相關問題