Siva Arunachalam
Siva Arunachalam

Reputation: 7740

Glassfish - java.lang.NoClassDefFoundError

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?

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)

Upvotes: 2

Views: 8501

Answers (2)

Krystian
Krystian

Reputation: 2290

You may just need to clean and build your project.

Upvotes: 0

Siva Arunachalam
Siva Arunachalam

Reputation: 7740

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

Upvotes: 5

Related Questions