Glassfish - java.lang.NoClassDefFoundError

我的未来我决定 提交于 2019-12-11 00:52:53

问题


I was following this blog to run a sample websocket application in glasshfish. The deployment failed with the following error. But the mentioned class file is available in the pom.xml and it is listed in the dependencies as well. Could you please help?

 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)

回答1:


Solved. You should not have the same jar in modules folder of glassfish and WEB-INF\lib folder.




回答2:


You may just need to clean and build your project.



来源:https://stackoverflow.com/questions/14826295/glassfish-java-lang-noclassdeffounderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!