users@glassfish.java.net

Strange classpath problem?

From: <glassfish_at_javadesktop.org>
Date: Mon, 07 May 2007 14:31:00 PDT

I'm testing Netbeans 5.5.1 w/ Glassfish V2 Beta 2 (b41d) and am experiencing some weirdness w/ a dependent jar.

I can build and deploy the app to the local Glassfish server setup in Netbeans and it works exactly as expected. The enterprise is a .ear with a web and EJB project...and a single .jar class library project of my own utility code.

When I run it locally, it works...but when deployed to a test box outside of Netbeans I get this error when pulling it up:

[code]
javax.servlet.ServletException: PWC1244: Servlet execution threw an exception
root cause

java.lang.NoClassDefFoundError: com.mycompany.utility.Config
[/code]

...basically telling me the .jar class library, even though it exists in the .ear and was deployed w/ everything else, cannot be found because it's not on the classpath.

This app is 2 yrs. old and runs in JBoss and ran fine in Glassfish V1 in past tests. I opened the .ear in Winzip and sure enough, the .jar lib is in there. Has something changed in Netbeans and/or Glassfish that I'm not aware of?

Even if that were the case....why does it work on my local box and not on the remote test box!!?
[Message sent by forum member 'zambizzi' (zambizzi)]

http://forums.java.net/jive/thread.jspa?messageID=215899