kyromoto kyromoto - 4 months ago 35
Java Question

ClassNotFoundException when start tyrus standalone server

I'm getting the following error on

server.start()
call:

ClassNotFoundException: org.glassfish.tyrus.container.grizzly.server.GrizzlyServerContainer


I also could not found a maven dependency for
GrizzlyServerContainer
.

Any ideas? Here is my code:

private WebSocketModulManager() {
server = new Server("127.0.0.1", 30000, "/lightconsole", null, LightconsoleEndpoint.class);
try {
server.start();
} catch (DeploymentException e) {
e.printStackTrace();
} finally {
server.stop();
}
}


Maven Dependecies

Answer

Try this dependency:

<dependency>
    <groupId>org.glassfish.tyrus</groupId>
    <artifactId>tyrus-container-grizzly-server</artifactId>
    <version>1.13</version>
</dependency>
Comments