What would the reasons be for getting a java.lang.NoClassDefFoundError if you are certain you have the needed class listed in your classpath? I'm trying to run a bash script that starts a java process which calls a web service, but I keep getting an error saying a class definition that is in webservices.jar is not found.
Here's the first part of the java command (minus the arguments for the AddMeasurement web service):
Code:
java -cp webservices.jar:ffdc.jar:wsdl4j.jar:ras.jar:bootstrap.jar:emf.jar:wsexception.jar:j2ee.jar:ESBCommon.jar:ESBClient.jar com.ibmsoa.client.driver.AddMeasurement
As you can see, my classpath includes webservices.jar, which includes com.ibm.ws.webservices.engine.components.logger.Lo gFactory:
Code:
# for file in *.jar; do echo "$file" && unzip -l "$file" | grep LogFactory; done
bootstrap.jar
emf.jar
ESBClient.jar
ESBCommon.jar
ffdc.jar
j2ee.jar
ras.jar
webservices.jar
935 11-05-04 12:09 com/ibm/ws/webservices/engine/components/logger/LogFactory$1.class
1364 11-05-04 12:09 com/ibm/ws/webservices/engine/components/logger/LogFactory.class
wsdl4j.jar
wsexception.jar
But I'm getting this error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/ws/webservices/engine/components/logger/LogFactory
Any ideas?
Bookmarks