This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes Problem with Apache axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with Apache axis" Watch "Problem with Apache axis" New topic
Author

Problem with Apache axis

wei ma
Ranch Hand

Joined: Jul 18, 2001
Posts: 39
Hi all,
I am new to web services, so please bear with me if my question doesn't make sence.
I tried to install Apache axis on top of tom cat. And I was able to access
http://localhost:8080/axis/index.html
with my browser.
When clicked on "Administer Axis", I got the following error:


type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
...
...
root cause
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPElement


I added all the required jar files to my classpath, and I have written a little test program to verify the correctness of classpath.
Can anyone tell me what I did wrong?
Thanks very much.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Put a copy of Xerces jar in the WEB-INF/lib and try again.
Axis needs a local XML Parser. It's in the installation instructions.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
wei ma
Ranch Hand

Joined: Jul 18, 2001
Posts: 39
Thanks Carl,
I did put the jar files under the correct directory. I will read the installation guide a bit more then.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
The javax.xml.soap package is part of the JAXM toolkit, so it is in (I think) jaxm.jar.
Which version of Tomcat is this?
Bill
wei ma
Ranch Hand

Joined: Jul 18, 2001
Posts: 39
Thanks guys,
I have found the answer on the mailing list. And I have added a document based on the answer I got on my home page. You can find it at
http://www.sce.carleton.ca/~weima/AxisInstallation.html
Thanks again
Wei
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
The solution Wei is refering to says "Do not use Tomcat 4.0.3". I am using Tomcat 4.0 and having similar problem.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/parsers/Doc
umentBuilderFactory
Installation instructions says,
In the WEB-INF directory, you'll find a "lib" directory. copy the jars associated with the JAXP 1.1 XML compliant parser of your choice. This generally means either the xerces.jar from the xml-xerces distribution, or the crimson.jar and jaxp.jar from the JAXP 1.1 reference implementation.
But FAQ says,
Tomcat will not load classes with package names starting "java." or "javax." from the WEB-INF directory. jars containing such classes need to be installed in $TOMCAT_HOME/common/lib rather than in WEB-INF/lib. Currently (April 25, 2002) jaxrpc.jar is such a jar.
Which of the above is true? If I do what FAQ says, I get the error, if I follow the installation instructions, I get the same error. My classpath is correct and I have tried restarting server and opening new cmd window etc. BTW my OS is windows 2000.
If I have local copy of jaxp.jar and xerces.jar, do I need to delete the copies from common\lib directory?
Any suggestions?
Chintan


ChintanRajyaguru.com
SOADevelopment.com - Coming soon!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
If you ever installed an earlier version of JAXP or another XML parser package on your system, it is possible that Java is picking up that package first, and not finding that class.
Look in JAVA_HOME/jre/lib/ext for example.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Apache axis