Glassfish - java.lang.NoClassDefFoundError [英] Glassfish - java.lang.NoClassDefFoundError

查看:315
本文介绍了Glassfish - java.lang.NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)


推荐答案

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

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

这篇关于Glassfish - java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆