Discussion:
Adding External Jar Files
(too old to reply)
j***@usmint.treas.gov
2006-12-05 16:16:51 UTC
Permalink
I want to add an external jar file that code in WebSphereCommerceServerExtensionsLogic can reference. I added it to the Stores.war/lib directory but I am getting a "java.lang.NoClassDefFoundError" at runtime. This makes sense, because our directory structure looks like this:

/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/Stores.war/WEB-INF/lib/externalJar.jar
/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/WebSphereCommerceServerExtensionsLogic.jar

So it makes sense that classes within WebSphereCommerceServerExtensionsLogic.jar can't access classes within Stores.war/WEB-INF/lib.

So...where do I add this jar file so that it can be accessed by classes in /opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/WebSphereCommerceServerExtensionsLogic.jar?
geo
2006-12-06 21:48:57 UTC
Permalink
That would be one way that would get you around the current issue.
Post by j***@usmint.treas.gov
I want to add an external jar file that code in
WebSphereCommerceServerExtensionsLogic can reference. I added it to the
Stores.war/lib directory but I am getting a
"java.lang.NoClassDefFoundError" at runtime. This makes sense, because our
/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/Stores.war/WEB-INF/lib/externalJar.jar
/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/WebSphereCommerceServerExtensionsLogic.jar
So it makes sense that classes within
WebSphereCommerceServerExtensionsLogic.jar can't access classes within
Stores.war/WEB-INF/lib.
So...where do I add this jar file so that it can be accessed by classes in
/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/WebSphereCommerceServerExtensionsLogic.jar?
s***@perficient.com
2006-12-07 01:37:33 UTC
Permalink
add external jar files in the following folder.

/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/lib

This will solve your problem. If not then let me know.
Brian Lima
2006-12-07 15:13:40 UTC
Permalink
Post by s***@perficient.com
add external jar files in the following folder.
/opt/WebSphere/AppServer/installedApps/stdwcs1/WC_wcsdev.ear/lib
This will solve your problem. If not then let me know.
I'd say that this is the appropriate place to put the external JAR file
but just remember that you'll have to update a MANIFEST.MF file to
update the classpath of the application. It's recommended that you
update the MANIFEST.MF file of the Stores.war with the addition JAR. In
this case you'd add the entry "lib/externalJar.jar". Just keep in mind
that the formatting of this file is very important. The line should
start with a space and end with a trailing space as well.

Continue reading on narkive:
Loading...