Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Glassfish return java.lang.NoClassDefFoundError when deploying while using library from external JAR  RSS feed

 
Ace David
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am currently developing an application using Glassfish v3 and Netbeans IDE 6.9 and currently having issues. I have an Enterprise Application project which consist of a project-ejb and project-war. I am trying to use an external library/har from the project-ejb.

In the project-ejb, I added the external library/jar using Properties > Libraries > Compile and used it on one of my session beans. The problem is that the server always return an error after I declared the variable that is using the library and deployed the project.




Compilation works fine but deployment does not. The weird thing is that when I use the external library from the project-war, it just deploys fine and it can use it properly. Please advise on what I am doing wrong. I have searched the forum thoroughly for solutions but it seems that I am the only one who cannot solve the problem. Thanks!

Regards,
Ace
 
Ace David
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After scouring google, I finally found a solution to a certain problem but tried it anyway. I just have to put the libraries in this directory: <glassfish_home>/domains/domain1/lib
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!