users@glassfish.java.net

External JAR files in Application Client

From: <glassfish_at_javadesktop.org>
Date: Tue, 24 Feb 2009 11:44:21 PST

My AppClient gets deployed OK (well, with errors like "Error attempting to process extensions from the manifest of JAR file" for each JAR file, but I learned those should be ignored..).

When the application tries to log something, I get this:
[i]Feb 24, 2009 2:29:59 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
[b]java.lang.NoClassDefFoundError:[/b] org/apache/log4j/Category[/i]

Where do I put external JAR files to get the AppClient run properly?

They currently sit in "domains/domain1/lib/ext/" (where I put JAR file for MySQL connector, which runs just fine) on the server AND in "META-INF/lib" path of the main client's JAR file.

The project is run with this script (you may see that I tried APPCPATH as well):
#!/bin/sh

export APPCPATH=$APPCPATH:/opt/glassfish/domains/domain1/lib/ext:/opt/glassfish/domains/domain1/generated/xml/j2ee-modules/MyProject1

/opt/glassfish/bin/appclient -client /opt/glassfish/domains/domain1/generated/xml/j2ee-modules/MyProject1/MyProject1.jar

Can anyone help?
[Message sent by forum member 'igorilla' (igorilla)]

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