gpt4 book ai didi

java - Glassfish - java.lang.NoClassDefFoundError

转载 作者:行者123 更新时间:2023-11-30 06:26:06 25 4
gpt4 key购买 nike

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

enter image description here

 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)

最佳答案

已解决。你不应该在 glassfish 的模块文件夹和 WEB-INF\lib 文件夹中有相同的 jar。

关于java - Glassfish - java.lang.NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14826295/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com