Unable to create Jetty WebSocketClient Java org.eclipse.jetty.websocket.client;

I am getting the following error

java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.websocket.core.WebSocketComponents.getObjectFactory()" because "this.components" is null

when trying to create a WebSocketClient

I have a look at the constructor and it seems like the WebSocketComponents field is set to null for this.coreClient… so of course this will throw a NullPointerException

Constructor

There seems to be no way to set this field? So how am I supposed to use WebSocketClient?

Read more here: Source link