I tried running the cp.jsp but I get a servlet exception with the root
cause being this
java.lang.ExceptionInInitializerError: java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:147)
at
org.apache.soap.util.xml.XMLParserUtils.refreshDocumentBuilderFactory(XMLParserUtils.java:112)
at org.apache.soap.util.xml.XMLParserUtils.(XMLParserUtils.java:79)
at org.apache.jsp._0002fcp_jsp._jspService(_0002fcp_jsp.java:107)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:200)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
I went into the jsp and edited it wher you have
out.write(Class.forName("org.apache.xerces.framework.Version")
.getField("fVersion").get(null).toString());
// equiv to
// out.write(org.apache.xerces.framework.Version.fVersion);
// but compiles even in the absence of xerces.
so that out.write(org.apache.xerces.framework.Version.fVersion);
was used and then I got this error
java.lang.NoClassDefFoundError
at org.apache.jsp._0002fcp_jsp._jspService(_0002fcp_jsp.java:107)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:200)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Any suggestions!
Rich Catlett
Tom Myers wrote:
> At 12:35 PM 7/26/2001 -0500, Rich Catlett wrote:
>
>> I have been at this for over two days. I can't get the services deployed. When I
>run testit.sh in the addressbook sample I get this error message.
>>
>> <h3>Root Cause:</h3>
>> <pre>
>> java.lang.NoClassDefFoundError
>> at org.apache.soap.server.ServiceManager.<init>(ServiceManager.java:83)...
>>
>> so on and so forth.
>>
>> I'm using soap 2.2 in tomcat 4.0 with xerces 1.4.2. The xerces.jar is first in the
>classpath, it shows up first in the classpath printed by tomcat on startup, and no
>other xerces.jar is in the java_home/jre/lib/ext dir or in the my classpath. I'm
>stumped. Please help.
>
>
> The ServiceManager.<init> code, in your 2.2 download directory
> /soap-2_2/src/org/apache/soap/server/ServiceManager.java
> has line 83
>
>> protected DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
>
>
> You might be messed up by a stray copy of parser.jar or crimson.jar;
> Look for jars anywhere that contain the string DocumentBuilderFactory
> (I wouldn't worry much about copies of jaxp.jar or xalan.jar, but on
> this machine I have six parser.jar and 4 crimson.jar, as well as 13 xerces.jar
> just for luck. It's easy to lose track.)
>
> Did you try running the cp.jsp and (more relevantly, since testit.sh depends on
> the command-line settings) the cp.java I sent? It does try to test precisely
> this, looking for your DocumentBuilder class as loaded by XMLParserUtils...
>
> Tom Myers
>
>