Hi, first very sorry I posted this to the beginners java group as it appears to be strightforward. However I though someone from this forum may be more specific with a resolution.
I am sorry if this has been asked a thousand times but....
1. I have installed AXIS 1.3 and all seems well i.e. I can view the happyaxis.jsp page and all the relevant jars are there.
2. As a post install activity I tried to run some of the web samples provided in the "Consuming Web Services with AXIS" section of the users guide. (samples\userguide\example1\TestClient.class) i.e. java samples.userguide.example1.TestClient
3. When I do this I get the "java.lang.NoClassDefFound" error.
4. I had assumed this meant the environment was looking for something it couldn't find, so as part of the java command I added the "-cp" switch followed by all the jar files referenced in the AXISCLASSPATH path i.e. axis.jar, activation.jar, ........
The error should state which class it's missing - that's a crucial piece of information for investigating this problem. Could it be that it's actually the TestClient class that is not in the classpath?
Not sure what you mean? Do you mean I should add the location of my compiled class into the class path?
The exact error I get from executing from command line is
Exception in thread main java.lang.NoclassDefFoundError: samples/userguide/example1/TestClient
As I say any help greatly appreciated.
Joined: Mar 22, 2005
Yes, the classpath should contain all (or most) of the Axis jar files, as well as the TestClient class. Most likely that means that you need to add %TOMCAT_HOME%/webapps/axis/WEB-INF/classes to your classpath.
Joined: Sep 23, 2003
Thanks again. However the problem persists. Here is the exact syntax of what I am trying to execute. I am executing here from the location of the .class file.