'How to resolve java.lang.NoClassDefFoundError: javax/websocket/ClientEndpointConfig$Configurator

I have been trying to get Spring Websockets to work for a little while now, the way the project is set up is that server is spring boot and has it's own separate set of dependencies. Client is just a JavaFX application. So I cannot use JavaScript client side, therefore I have been going around trying to find a client implementation of WebSockets.

There are a great many websites showing how to do those, as some of you will likely point out, the main problem being that all of them use the "StandardWebSocketClient()" which always causes the error java.lang.NoClassDefFoundError. Supposedly this is due to the fact that some other dependency should contain an actual implementation of the websockets. But the fun part is that whatever dependency I try to use, none of them actually succeed in making the error go away. I tried tyrus standalone client, etc etc.

Here are some of the tutorials exhibiting this problem: https://www.sitepoint.com/implementing-spring-websocket-server-and-client/#javaspringchatclient https://www.baeldung.com/websockets-api-java-spring-client

if anyone encountered a similar issue, I would be more than happy to have any help on this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source