Tomcat 6 + Axis problem

J

juhanay

Hi
I have succesfully installed axis 1.4 + tomcat 6.0.10 and JWS files
seems to be running right.
However when I try to run a basic calculator client example from axis
userguide (page 8)

http://ws.apache.org/axis/java/user-guide.html

I get the folowing error message

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
\axis>java samples
..userguide.example2.CalcClient -p8080 add 2 5

Exception in thread "main" java.lang.NoClassDefFoundError:
org.apache.commons.logging.LogFactory
at org.apache.axis.components.logger.LogFactory.class$
(LogFactory.java:45)
at org.apache.axis.components.logger.LogFactory
$1.run(LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:
41)
at
org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:
33)
at org.apache.axis.utils.Options.<clinit>(Options.java:35)
at samples.userguide.example2.CalcClient.main(CalcClient.java:
29)

The service works through Tomcat and it can be accesed as the
userguide says(localhost:8080/axis/Calculator.jws), but i cannot get
the client working. I hope that someone can help me out.
 
?

=?ISO-8859-15?Q?Arne_Vajh=F8j?=

I have succesfully installed axis 1.4 + tomcat 6.0.10 and JWS files
seems to be running right.
However when I try to run a basic calculator client example from axis
userguide (page 8)

http://ws.apache.org/axis/java/user-guide.html

I get the folowing error message

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
\axis>java samples
.userguide.example2.CalcClient -p8080 add 2 5

Exception in thread "main" java.lang.NoClassDefFoundError:
org.apache.commons.logging.LogFactory
The service works through Tomcat and it can be accesed as the
userguide says(localhost:8080/axis/Calculator.jws), but i cannot get
the client working. I hope that someone can help me out.

It sounds as if jakarta commons logging jar file is missing
in classpath !

Arne
 
J

juhanay

Hi again.
No joy with the jakarta commons logging jar file. I will list here the
most important enviromental variables. These are windows XP
enviromental variables.

AXIS_HOME C:\Program Files\Apache Software Foundation
\Tomcat 6.0\webapps\axis
AXIS_LIB %AXIS_HOME%\WEB-INF\lib
AXISCLASSPATH %AXIS_LIB%\axis.jar;
%AXIS_LIB%\jaxrpc.jar;
%AXIS_LIB%\saaj.jar;
%AXIS_LIB%\commons-logging.jar;
%AXIS_LIB%\commons-discovery.jar;
%AXIS_LIB%\wsdl4j.jar;
%AXIS_HOME%;
%AXIS_HOME%\WEB-INF\classes\;
CLASSPATH %AXISCLASSPATH%
JAVA_HOME C:\Program Files\Java\jdk1.6.0_01


I still cannot make it work? Any suggestions I am puzzed. Could
someone help me out please.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

No joy with the jakarta commons logging jar file. I will list here the
most important enviromental variables. These are windows XP
enviromental variables.

AXIS_HOME C:\Program Files\Apache Software Foundation
\Tomcat 6.0\webapps\axis
AXIS_LIB %AXIS_HOME%\WEB-INF\lib
AXISCLASSPATH %AXIS_LIB%\axis.jar;
%AXIS_LIB%\jaxrpc.jar;
%AXIS_LIB%\saaj.jar;
%AXIS_LIB%\commons-logging.jar;
%AXIS_LIB%\commons-discovery.jar;
%AXIS_LIB%\wsdl4j.jar;
%AXIS_HOME%;
%AXIS_HOME%\WEB-INF\classes\;
CLASSPATH %AXISCLASSPATH%
JAVA_HOME C:\Program Files\Java\jdk1.6.0_01

I still cannot make it work? Any suggestions I am puzzed. Could
someone help me out please.

The classpath is not rigth.

I don't quite understand what the above is. It does not appear
to be either commands to set env vars or display of env vars.

You could start by moving the stuff to a dir with no spaces in the
name. That has cause many problems over the years.

Arne
 
L

Lew

Arne said:
The classpath is not rigth.

I don't quite understand what the above is. It does not appear
to be either commands to set env vars or display of env vars.

Interpreting the list as a representation of Windows envars and their values,
with extraneous whitespace to be eliminated in "real life", I see some issues
aside from the failure to literally quote the relevant values.

The OP has deployed Axis to a web app inside Tomcat 6. Usually no explicit
classpath is needed for Tomcat beyond having JARs in the webapp's WEB-INF/lib
directory. Yet they also set up an explicit Java classpath to use the JARs.
Presumably this is to make life easier for Wsdl2Java runs and the like.

However, having a specific deployment of a specific web app as a CLASSPATH
element makes it vulnerable to redeployments and undeployments, which
presumably are done with regard only for reasons relevant to the web-app
environment.

It is better to use an "endorsed" directory of some kind, independent of the
web container, as a classpath element.

As an aside, Axis-enabled web apps don't /have/ to be called "axis".

The envar approach is also a little dicey because the CLASSPATH thus defined
is global. This makes it hard to understand what's going on with disparate
projects sometimes. Better to use launch scripts that set their own specific
classpaths for use in the -cp command option. Best of all to use Ant.
You could start by moving the stuff to a dir with no spaces in the
name. That has cause many problems over the years.

You can get around the whitespace problem by putting quotes (") around the
path elements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top