Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tomcat 6 + Axis problem

0 views
Skip to first unread message

juh...@mbnet.fi

unread,
May 8, 2007, 7:16:59 PM5/8/07
to
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.

Arne Vajhøj

unread,
May 8, 2007, 8:55:41 PM5/8/07
to
juh...@mbnet.fi wrote:
> 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

juh...@mbnet.fi

unread,
May 9, 2007, 10:57:12 AM5/9/07
to
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.

Arne Vajhøj

unread,
May 19, 2007, 4:43:09 PM5/19/07
to

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

Lew

unread,
May 19, 2007, 5:23:13 PM5/19/07
to
Arne Vajhøj wrote:
> juh...@mbnet.fi wrote:
>> 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.

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.

--
Lew

0 new messages