Open SkipperQ93 opened 10 months ago
Hi, thanks for reporting this. I'll take a look and get back to you soon.
This is more involved than I thought it would. It doesn't look like the websocket endpoint is picked up?
I'm also encountering a differnet exception when I deploy it on OL:
2023-11-10T15:53:58.011-05:00 WARN 76558 --- [cutor-thread-26] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class java.util.LinkedHashMap] with preset Content-Type 'text/html;charset=UTF-8']
[ERROR ] Error Page Exception:
0-0
Error Page Exception
com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0295E: Error reported: 500
2023-11-10T15:55:55.779-05:00 WARN 76558 --- [ecutor-thread-9] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class java.util.LinkedHashMap] with preset Content-Type 'text/html;charset=UTF-8']
Hmm. Restarted the application and it went away? I just getting: "Firefox can’t establish a connection to the server at ws://localhost:8080/gs-guide-websocket. "
The websocket trace doesn't show the endpoint was started. Did websockets work with previous springboot features? Our code hasn't changed much between 1.1, 2.0, and 2.1.
There may be some missing integration step with our websocket implementation if springBoot changed.
Otherwise, I'm not getting a 200 response at all? I enabled the app via
<springBootApplication location='/path/to/gs-messaging-stomp-websocket/complete/build/libs/messaging-stomp-websocket-0.0.1-SNAPSHOT.jar'/>
The same war package when tested on tomcat works fine. There is no code change at all.
Describe the bug
I have set up a simple websocket application(https://github.com/spring-guides/gs-messaging-stomp-websocket) and deployed on both tomcat 10 and OpenLiberty. When I try to connect WebSocket, stomp gives an error that it is unable to connect. I tried logging and this what I get:
Now When I try connecting on tomcat 10, the logs are like:
The only difference I see here is that with OpenLiberty, the request does not upgrade to websocket with status code 101. Instead it is responding with 200 status code.
Is there something wrong that I am doing here. Any help would be really appreciated.
Steps to Reproduce
1) Clone https://github.com/spring-guides/gs-messaging-stomp-websocket 2) Deploy on OpenLiberty. 3) Click "Connect"
Expected behavior
The websocket connection to switch protocol (101 code) and connection should be established.
Diagnostic information:
server.xml configuration: