I will preface this with I am not using any maven dependencies, yet I know that I am missing a jar file wls-api.jar (at least that is what I have read).
To
I think the RuntimeException you are experiencing is fortunately not generated by any direct coding fault of your own.
The method getWebSocketContainer(), as described here, simply tries to load other classes and get the static instance of the ContainerProvider in the server.
The method looks for the
ContainerProviderimplementation class in the order listed in theMETA-INF/services/javax.websocket.ContainerProviderfile, returning theWebSocketContainerimplementation from theContainerProviderimplementation that is notnull.
This, unfortunately, means that your project is not configured correctly. Double check to make sure this file is included in your project's build path.
If other projects you are looking at are using the Maven dependency you described, I would try to set up your project to do the same.
Hope this helped!