• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Apache axis

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
wei ma
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Carl,
I did put the jar files under the correct directory. I will read the installation guide a bit more then.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic