Showing posts with label websocket. Show all posts
Showing posts with label websocket. Show all posts

Friday, December 23, 2016

How to solve common error on Oracle Weblogic using Spring Websocket?

The fooling error clarify the handshake use in Spring Websocket as it is said in the folling line:

registry.addEndpoint("/portafolio").setAllowedOrigins("*").withSockJS();

Error:


The solution to this error should be review Spring Messaging and Websocket version to charge 4.3.5.RELEASE version, there are somes changes from version 4.1.2.RELEASE to 4.3.5.RELEASE specially in Tyrus container and application server distribution.

Error:
Error during WebSocket handshake: Unexpected response code: 500

Solution: Add handshakehandler.-
registry.addEndpoint("/portafolio").setHandshakeHandler(new DefaultHandshakeHandler(new WebLogicRequestUpgradeStrategy()))
    .setAllowedOrigins("*").withSockJS();



Best regards,