2

我正在关注此博客以在 glasshfish 中运行示例 websocket 应用程序。部署失败并出现以下错误。但是提到的类文件在 pom.xml 中可用,并且它也列在依赖项中。能否请你帮忙?

在此处输入图像描述

 Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/websocket/spi/Endpoint. Please see server.log for more details.
The module has not been deployed.
See the server log for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
    at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
    at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
    at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
4

2 回答 2

5

解决了。Glassfish 的 modules 文件夹和 WEB-INF\lib 文件夹中不应有相同的 jar。

于 2013-02-12T08:49:36.967 回答
0

您可能只需要清理和构建您的项目。

于 2015-01-23T15:17:14.237 回答