axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Ludlow <>
Subject Re: Problem with WSDL samples of user guide
Date Tue, 30 Nov 2004 17:57:15 GMT

--- David Werner <> wrote:
> OK, here's my problem. After following the steps
> described in the
> installation guide, I successfully tried the
> examples mentioned in the user
> guide with Axis 1.1. But I'm running into problems
> when I try the samples of
> section "Using WSDL with Axis". I also tried using
> Axis 1.2 RC2, but it
> didn't help. BTW, I'm using Windows XP, Tomcat 5.0
> and JDK 1.4.
> Here's the error message for the AddressBook example
> (WSDL2Java) with Axis
> 1.2 RC2:
> ------------
> D:\ptme\install\Axis\axis-1_2RC2\samples\addr>java
> org.apache.axis.wsdl.WSDL2Jav
> a AddressBook.wsdl
> log4j:WARN No appenders could be found for logger
> (org.apache.axis.i18n.ProjectR
> esourceBundle).
> log4j:WARN Please initialize the log4j system
> properly.
> Exception in thread "main"
> java.lang.NoClassDefFoundError:
> javax.wsdl.Definition

I had a similar problem with the Axis examples, using
Windows XP, Tomcat 4.1, and JDK 1.4.  It's possible
that you made the same mistake that I did.

The Axis documentation mentions the following:
"Java 1.4 changed the rules as to how packages
beginning in java.* and javax.* get loaded.
Specifically, they only get loaded from endorsed
directories. jaxrpc.jar and saaj.jar contain javax
packages, so they may not get picked up. If
happyaxis.jsp (see below) cannot find the relevant
packages, copy them from axis/WEB-INF/lib to
CATALINA_HOME/common/lib and restart Tomcat."

That's great for the server, but you also have to take
that into account for the command line too.  I used
the following switch to fix this.

C:\axis>java -Djava.endorsed.dirs=/axis/lib
samples.userguide.example2.CalcClient -p8081 add 5 6

I still see this next error, but the example runs now,
and it's no longer complaining about not being able to
find classes in the wsdl4.jar packages.
"- Unable to find required classes
(javax.activation.DataHandler and
javax.mail.internet.MimeMultipart). Attachment support
is disabled."

I haven't dug into these errors yet, but I imagine
that it's a similar problem.

-- James

View raw message