axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Genuine java.lang.NoClassDefFoundError: org/apache/axis/clie nt/AdminClient issue...solved!!!
Date Tue, 29 Apr 2003 14:02:05 GMT

Fixed this for you. :-)

I will note however that the instructions are for setting the variables in a command window,
so as given they will work.


--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Jeff [mailto:jeff@cogentlogic.com] 
Sent: Tuesday, April 29, 2003 12:40 AM
To: axis-user@ws.apache.org
Subject: Genuine java.lang.NoClassDefFoundError: org/apache/axis/client/AdminClient issue...solved!!!

Hi!

I'm new to Axis but I've been developing Java for many years and have several COTS products
to my name. Consequently, you would think that I wouldn't fall foul of classpath issues! Unfortunately,
I still do and, until Sun get around to fixing this abomination, I suppose I will continue
to have classpath problems.


By following the Axis setup instructions I get the error:

    java.lang.NoClassDefFoundError: org/apache/axis/client/AdminClient

It isn't my fault though...honest!


The problem lies with the way my system (Windows NT 4 + SP6a) evaluates environment variables.
So, here's yet another example of M$ trash: on Windows NT 4 + SP6a, environment variables
are evaluated in alphanumeric order of name such that when an environment variable refers
to one that has yet to be encountered the algorithm takes it as a literal rather than an alias
(it ought to perform a recursive evaluation, of course). Consequently, when the Axis setup
is followed, the environment variables are evaluated in the order:

  AXIS_HOME
  AXISCLASSPATH
  AXISLIB

hence, AXISLIB is unknown to NT when AXISCLASSPATH is evaluated so AXISCLASSPATH winds up
as:

%AXISLIB%/axis.jar;%AXISLIB%/commons-discovery.jar;%AXISLIB%/commons-logging.jar;%AXISLIB%/jaxrpc.jar;%AXISLIB%/saaj.jar;%AXISLIB%/log4j-1.2.4.jar;%AXISLIB%/xml-apis.jar;%AXISLIB%/xercesImpl.jar

which results in java.lang.NoClassDefFoundError: org/apache/axis/client/AdminClient because
JVMs don't expand Windows environment variables, of course.


By changing AXISLIB to AXIS_LIB, the evaluation order becomes:

  AXIS_HOME
  AXIS_LIB
  AXISCLASSPATH

so AXISCLASSPATH evaluates correctly and all is well!

If someone would be so kind as to reflect this in the setup instructions then it will likely
help other classpath victims (especially since the instructions indicate that it is always
their fault when a NoClassDefFoundError occurs).


Warmest regards,

Jeff Lawson
Cogent Logic,
Toronto, Canada

Mime
View raw message