启动tyrus独立服务器时ClassNotFoundException

时间:2016-07-09 18:04:18

标签: java maven classnotfoundexception grizzly tyrus

我在server.start()电话上收到以下错误:

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

我也找不到GrizzlyServerContainer的maven依赖。

有什么想法吗?这是我的代码:

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

1 个答案:

答案 0 :(得分:1)

尝试此依赖项:

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