Skip to content
Advertisement

Tag: spring-websocket

How can I fix NoClassDefFoundError when using Spring framework’s WebSocketClient

I am writing a desktop Java application as a web service client. I want to use WebSocket to implement notification “callback” from the server. I am using the Spring framework’s WebSocketStompClient. Below snippet shows how I initialize it: It works perfectly if I run it in IntelliJ IDE, however, if I run by command line “java -cp my.jar MyPackage.MyMainClass”, it

Attribute ServerContainer not found in ServletContext

In my Spring boot application i use also websockets. Everything works fine, as expected in production. Now i started to create UnitTests with Spring-Boot-Test. Every time i start a @SpringBootTest , i get following exception (shortened): Long Version Spring Websocket Config Class POM.XML Spring Application Class Typical Failing Test Problem The Problem is, the actual Test never comes to the

Spring Websocket STOMP: send RECEIPT frames

I have a Websocket-stomp server based on Spring and its SimpleBroker implementation (not utilizing an external broker). I would like to enable STOMP RECEIPT messages. How I could configure my code to send these automatically? Answer In Spring Integration test for the STOMP protocol we have this code: https://github.com/spring-projects/spring-integration/blob/master/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/inbound/StompInboundChannelAdapterWebSocketIntegrationTests.java

Advertisement