You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Rich Catlett <ri...@more.net> on 2001/07/26 19:35:57 UTC

help can't get services deployed

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)
   at 
org.apache.soap.server.http.ServerHTTPUtils.getServiceManagerFromContext(ServerHTTPUtils.java:103)
   at 
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:212)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
   at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)   

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.

Rich Catlett


Re: help can't get services deployed

Posted by Rich Catlett <ri...@more.net>.
Thanks everyone for you help.

I got the problem worked out.  When dealing with tomcat4 you want to put 
the xerces.jar file into the tomcat4/lib directory.  I now have another 
problem though.

When I run testit.sh from the address sample it deploys just fine, but 
when it tries to list the services I get this error

Verify that it's there
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Connection reset by peer: Connection reset by peer; targetException=java.net.SocketException: Connection reset by peer: Connection reset by peer]
	at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:328)
	at org.apache.soap.rpc.Call.invoke(Call.java:205)
	at org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:129)
	at org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:151)
	at org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:237)
I also get this same error when I run testit.sh in the message sample, 
the messaging service is not even able to be deployed.

Rich Catlett


Tom Myers wrote:

> At 03:00 PM 7/26/2001 -0500, Rich Catlett wrote:
> 
>> I tried running the cp.jsp but I get a servlet exception with the root cause being this
>> 
>> java.lang.ExceptionInInitializerError: java.lang.ClassCastException: 
>> ....
>> I went into the jsp and edited it ... ... ... and then I got this error
>> 
>> java.lang.NoClassDefFoundError
>> Any suggestions!
> 
> 
> Ouch. I'd written the calls within try{...}catch(Exception ex){out.write...}
> blocks, expecting this to catch any exceptions---and it would have. Unfortunately,
> java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError do
> _not_ extend Exception, they extend Throwable. So I've just editted the code to
> replace those two Exceptions with Throwable; that should prevent collapse.
> Thanks for trying it.
> 
> The implication appears to be that Xerces is just not being found, unless it
> means that Xerces 1.4.2 has dropped the framework.Version.fVersion system..so I
> just downloaded Xerces 1.4.2 (source) and looked, and am not surprised because
> it's still there. My suspicion is that the classpath you tried to set up is not 
> the one you're getting, as happens all too often to people on this list.
> 
> Tom Myers
> 
> 
> ------------------------------------------------------------------------
> 
> public class cp {
> /* test classpath (and other system properties); if you improve this
> code, please tell <a href="mailto:tommyers@dreamscape.com">Tom Myers</a> about it,
> unless you'd really rather not.
> */
> public static void main(String[]args){
>  try{ // spaces between classpath entries for readability
> System.out.println("CLASSPATH:");
>   String cp=System.getProperty("java.class.path");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(cp,";");
>   while(st.hasMoreTokens())System.out.print(st.nextToken()+"; ");
>  }catch(Exception ex){System.out.print("can't get classpath, exception: "+ex);}
> System.out.println();
> System.out.println();
> System.out.print("EXTENSIONS DIRS:");
>  try{
>   String edirs=System.getProperty("java.ext.dirs");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(edirs,";");
>   while(st.hasMoreTokens()) { // I'm not sure there'll ever be more than 1
>    String ed=st.nextToken();
>    System.out.println();System.out.println(ed+":");
>    java.io.File edDir=new java.io.File(ed);
>    if(!edDir.exists())throw new Exception( "no such directory as "+ed);
>    if(!edDir.isDirectory())throw new Exception( ed + " is not a directory.");
>    String[] LL = edDir.list();
>    for(int i=0;i<LL.length;i++)System.out.print(i==0?LL[i]:"; "+LL[i]);
>    }
>  }catch(Exception ex){System.out.print("can't get extensions dir, exception: "+ex);}
> 
> System.out.println();System.out.println();
> System.out.print("XERCES VERSION=");
>   try{
>     System.out.println(Class.forName("org.apache.xerces.framework.Version")
>               .getField("fVersion").get(null).toString());
> // equiv to 
> //   System.out.print(org.apache.xerces.framework.Version.fVersion);
> // but compiles even in the absence of xerces.
>   }catch(Throwable ex){System.out.println("not found");}
> 
> System.out.println();
> System.out.print("DOM DocumentBuilder class="); 
>   try{ // similarly, we want to compile in the absence of Apache SOAP
> //    System.out.print(org.apache.soap.util.xml.XMLParserUtils.getXMLDocBuilder().getClass().getName());
> 
>      System.out.println(Class.forName("org.apache.soap.util.xml.XMLParserUtils")
>                  .getMethod("getXMLDocBuilder",new Class[]{})
>                  .invoke(null,new Object[]{})
>                  .getClass().getName() );
>   }catch(Throwable ex){System.out.println("not found");}
> System.out.println();
> System.out.println("MISCELLANEOUS PROPERTIES");
>   try{System.getProperties().store(System.out,"SysProps");}
>   catch(java.io.IOException ex){System.out.println("can't store system props to System.out?");}
> }
> }
> 
> 
> ------------------------------------------------------------------------
> 
> <html><head><title>Classpath and so forth</title></head>
> <body>
> Classpath (and other system properties); if you improve this
> code, please tell <a href="mailto:tommyers@dreamscape.com">Tom Myers</a> about it,
> unless you'd really rather not.
> <h4>Classpath:</h4>
> <%
>  try{ // spaces between classpath entries for readability
>   String cp=System.getProperty("java.class.path");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(cp,";");
>   while(st.hasMoreTokens())out.write(st.nextToken()+"; ");
>  }catch(Exception ex){out.write("can't get classpath, exception: "+ex);}
> %>
> <br>
> <p>That is the classpath as seen by this specific JSP page, constructed by
> the servlet-runner (Tomcat, JRun, whatever). If it's a surprise,
> look in the setup (e.g., jakarta-tomcat/bin/tomcat.[bat,sh] or 
> jrun/lib/global.properties ) to see how
> it's constructed. Servlet-runners often put their own classes in front,
> and you may need to change that.
> </p><p>
>  It is likely to be the classpath for your servlet/JSP/SOAP-service code,
> but may not be if you're running an app in its own virtual machine; 
> for example, WebSphere applications are described at
>  <a href="http://service2.boulder.ibm.com/devtools/news0101/art36.htm">IBM</a>
> as "In the WebSphere 3 administration console using the topology tab, navigate to your 
> Web application, for example, the default_app. On the advanced tab, specify the classpath..."
> So check your documentation, especially in any enterprise app situation.
> </p>
> <h4>Extensions dirs</h4>
> <%
>  try{
>   String edirs=System.getProperty("java.ext.dirs");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(edirs,";");
>   while(st.hasMoreTokens()) { // I'm not sure there'll ever be more than 1
>    String ed=st.nextToken();
>    out.write("<b>"+ed+":</b><br>");
>    java.io.File edDir=new java.io.File(ed);
>    if(!edDir.exists())throw new Exception( "no such directory as "+ed);
>    if(!edDir.isDirectory())throw new Exception( ed + " is not a directory.");
>    String[] LL = edDir.list();
>    for(int i=0;i<LL.length;i++)out.write(i==0?LL[i]:"; "+LL[i]);
>    }
>  }catch(Throwable ex){out.write("can't get extensions dir, exception: "+ex);}
>  %>
> <p><b>Classes in extension-dir jars are read in <em>before</em> those on the classpath</b>
> (i.e., they are "in front of the classpath"), but they are read by the extension classloader.
> They are visible to those in classpath,
> but those in classpath may not be visible to them. (You can look upwards in the hierarchy
> of classloaders, but not down.)
> Similarly, the classes in your webapp's WEB-INF/classes and WEB-INF/lib/*.jar locations
> will be loaded by the servlet-runner's classloader, which is below the system classloader;
> details vary.</p>
> <h4>Xerces Version=
> <% 
>   try{
>     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.
>   }catch(Throwable ex){out.write("not found");}
> %></h4>
> 
> <h4>SOAP's DOM DocumentBuilder class=
> <% 
>   try{ // similarly, we want to compile in the absence of Apache SOAP
> //    out.write(org.apache.soap.util.xml.XMLParserUtils.getXMLDocBuilder().getClass().getName());
> 
>      out.write(Class.forName("org.apache.soap.util.xml.XMLParserUtils")
>                  .getMethod("getXMLDocBuilder",new Class[]{})
>                  .invoke(null,new Object[]{})
>                  .getClass().getName() );
>   }catch(Throwable ex){out.write("not found");}
> %></h4>
> 
> 
> 
> 
> <h4>Miscellaneous properties:</h4>
> <p>e.g., user.dir is where you look for files by default.</p>
> <pre>
> <%
>   final java.io.Writer w=out;
>   java.io.OutputStream os=new java.io.OutputStream(){
>      public void write(int b)throws java.io.IOException{w.write(b);}
>   };
>   System.getProperties().store(os,"SysProps");
> %>
> </pre>
> 
> </body>
> </html>
> cp.java
> 
> Content-Type:
> 
> text/plain
> 
> 
> ------------------------------------------------------------------------
> cp.jsp
> 
> Content-Type:
> 
> text/plain
> 
> 


Re: help can't get services deployed

Posted by Rich Catlett <ri...@more.net>.
Thanks everyone for you help.

I got the problem worked out.  When dealing with tomcat4 you want to put 
the xerces.jar file into the tomcat4/lib directory.  I now have another 
problem though.

When I run testit.sh from the address sample it deploys just fine, but 
when it tries to list the services I get this error

Verify that it's there
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Connection reset by peer: Connection reset by peer; targetException=java.net.SocketException: Connection reset by peer: Connection reset by peer]
	at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:328)
	at org.apache.soap.rpc.Call.invoke(Call.java:205)
	at org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:129)
	at org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:151)
	at org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:237)
I also get this same error when I run testit.sh in the message sample, 
the messaging service is not even able to be deployed.

Rich Catlett


Tom Myers wrote:

> At 03:00 PM 7/26/2001 -0500, Rich Catlett wrote:
> 
>> I tried running the cp.jsp but I get a servlet exception with the root cause being this
>> 
>> java.lang.ExceptionInInitializerError: java.lang.ClassCastException: 
>> ....
>> I went into the jsp and edited it ... ... ... and then I got this error
>> 
>> java.lang.NoClassDefFoundError
>> Any suggestions!
> 
> 
> Ouch. I'd written the calls within try{...}catch(Exception ex){out.write...}
> blocks, expecting this to catch any exceptions---and it would have. Unfortunately,
> java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError do
> _not_ extend Exception, they extend Throwable. So I've just editted the code to
> replace those two Exceptions with Throwable; that should prevent collapse.
> Thanks for trying it.
> 
> The implication appears to be that Xerces is just not being found, unless it
> means that Xerces 1.4.2 has dropped the framework.Version.fVersion system..so I
> just downloaded Xerces 1.4.2 (source) and looked, and am not surprised because
> it's still there. My suspicion is that the classpath you tried to set up is not 
> the one you're getting, as happens all too often to people on this list.
> 
> Tom Myers
> 
> 
> ------------------------------------------------------------------------
> 
> public class cp {
> /* test classpath (and other system properties); if you improve this
> code, please tell <a href="mailto:tommyers@dreamscape.com">Tom Myers</a> about it,
> unless you'd really rather not.
> */
> public static void main(String[]args){
>  try{ // spaces between classpath entries for readability
> System.out.println("CLASSPATH:");
>   String cp=System.getProperty("java.class.path");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(cp,";");
>   while(st.hasMoreTokens())System.out.print(st.nextToken()+"; ");
>  }catch(Exception ex){System.out.print("can't get classpath, exception: "+ex);}
> System.out.println();
> System.out.println();
> System.out.print("EXTENSIONS DIRS:");
>  try{
>   String edirs=System.getProperty("java.ext.dirs");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(edirs,";");
>   while(st.hasMoreTokens()) { // I'm not sure there'll ever be more than 1
>    String ed=st.nextToken();
>    System.out.println();System.out.println(ed+":");
>    java.io.File edDir=new java.io.File(ed);
>    if(!edDir.exists())throw new Exception( "no such directory as "+ed);
>    if(!edDir.isDirectory())throw new Exception( ed + " is not a directory.");
>    String[] LL = edDir.list();
>    for(int i=0;i<LL.length;i++)System.out.print(i==0?LL[i]:"; "+LL[i]);
>    }
>  }catch(Exception ex){System.out.print("can't get extensions dir, exception: "+ex);}
> 
> System.out.println();System.out.println();
> System.out.print("XERCES VERSION=");
>   try{
>     System.out.println(Class.forName("org.apache.xerces.framework.Version")
>               .getField("fVersion").get(null).toString());
> // equiv to 
> //   System.out.print(org.apache.xerces.framework.Version.fVersion);
> // but compiles even in the absence of xerces.
>   }catch(Throwable ex){System.out.println("not found");}
> 
> System.out.println();
> System.out.print("DOM DocumentBuilder class="); 
>   try{ // similarly, we want to compile in the absence of Apache SOAP
> //    System.out.print(org.apache.soap.util.xml.XMLParserUtils.getXMLDocBuilder().getClass().getName());
> 
>      System.out.println(Class.forName("org.apache.soap.util.xml.XMLParserUtils")
>                  .getMethod("getXMLDocBuilder",new Class[]{})
>                  .invoke(null,new Object[]{})
>                  .getClass().getName() );
>   }catch(Throwable ex){System.out.println("not found");}
> System.out.println();
> System.out.println("MISCELLANEOUS PROPERTIES");
>   try{System.getProperties().store(System.out,"SysProps");}
>   catch(java.io.IOException ex){System.out.println("can't store system props to System.out?");}
> }
> }
> 
> 
> ------------------------------------------------------------------------
> 
> <html><head><title>Classpath and so forth</title></head>
> <body>
> Classpath (and other system properties); if you improve this
> code, please tell <a href="mailto:tommyers@dreamscape.com">Tom Myers</a> about it,
> unless you'd really rather not.
> <h4>Classpath:</h4>
> <%
>  try{ // spaces between classpath entries for readability
>   String cp=System.getProperty("java.class.path");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(cp,";");
>   while(st.hasMoreTokens())out.write(st.nextToken()+"; ");
>  }catch(Exception ex){out.write("can't get classpath, exception: "+ex);}
> %>
> <br>
> <p>That is the classpath as seen by this specific JSP page, constructed by
> the servlet-runner (Tomcat, JRun, whatever). If it's a surprise,
> look in the setup (e.g., jakarta-tomcat/bin/tomcat.[bat,sh] or 
> jrun/lib/global.properties ) to see how
> it's constructed. Servlet-runners often put their own classes in front,
> and you may need to change that.
> </p><p>
>  It is likely to be the classpath for your servlet/JSP/SOAP-service code,
> but may not be if you're running an app in its own virtual machine; 
> for example, WebSphere applications are described at
>  <a href="http://service2.boulder.ibm.com/devtools/news0101/art36.htm">IBM</a>
> as "In the WebSphere 3 administration console using the topology tab, navigate to your 
> Web application, for example, the default_app. On the advanced tab, specify the classpath..."
> So check your documentation, especially in any enterprise app situation.
> </p>
> <h4>Extensions dirs</h4>
> <%
>  try{
>   String edirs=System.getProperty("java.ext.dirs");
>   java.util.StringTokenizer st=new java.util.StringTokenizer(edirs,";");
>   while(st.hasMoreTokens()) { // I'm not sure there'll ever be more than 1
>    String ed=st.nextToken();
>    out.write("<b>"+ed+":</b><br>");
>    java.io.File edDir=new java.io.File(ed);
>    if(!edDir.exists())throw new Exception( "no such directory as "+ed);
>    if(!edDir.isDirectory())throw new Exception( ed + " is not a directory.");
>    String[] LL = edDir.list();
>    for(int i=0;i<LL.length;i++)out.write(i==0?LL[i]:"; "+LL[i]);
>    }
>  }catch(Throwable ex){out.write("can't get extensions dir, exception: "+ex);}
>  %>
> <p><b>Classes in extension-dir jars are read in <em>before</em> those on the classpath</b>
> (i.e., they are "in front of the classpath"), but they are read by the extension classloader.
> They are visible to those in classpath,
> but those in classpath may not be visible to them. (You can look upwards in the hierarchy
> of classloaders, but not down.)
> Similarly, the classes in your webapp's WEB-INF/classes and WEB-INF/lib/*.jar locations
> will be loaded by the servlet-runner's classloader, which is below the system classloader;
> details vary.</p>
> <h4>Xerces Version=
> <% 
>   try{
>     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.
>   }catch(Throwable ex){out.write("not found");}
> %></h4>
> 
> <h4>SOAP's DOM DocumentBuilder class=
> <% 
>   try{ // similarly, we want to compile in the absence of Apache SOAP
> //    out.write(org.apache.soap.util.xml.XMLParserUtils.getXMLDocBuilder().getClass().getName());
> 
>      out.write(Class.forName("org.apache.soap.util.xml.XMLParserUtils")
>                  .getMethod("getXMLDocBuilder",new Class[]{})
>                  .invoke(null,new Object[]{})
>                  .getClass().getName() );
>   }catch(Throwable ex){out.write("not found");}
> %></h4>
> 
> 
> 
> 
> <h4>Miscellaneous properties:</h4>
> <p>e.g., user.dir is where you look for files by default.</p>
> <pre>
> <%
>   final java.io.Writer w=out;
>   java.io.OutputStream os=new java.io.OutputStream(){
>      public void write(int b)throws java.io.IOException{w.write(b);}
>   };
>   System.getProperties().store(os,"SysProps");
> %>
> </pre>
> 
> </body>
> </html>
> cp.java
> 
> Content-Type:
> 
> text/plain
> 
> 
> ------------------------------------------------------------------------
> cp.jsp
> 
> Content-Type:
> 
> text/plain
> 
> 


Re: help can't get services deployed

Posted by Tom Myers <to...@dreamscape.com>.
At 03:00 PM 7/26/2001 -0500, Rich Catlett wrote:
>I tried running the cp.jsp but I get a servlet exception with the root cause being this
>
>java.lang.ExceptionInInitializerError: java.lang.ClassCastException: 
>....
>I went into the jsp and edited it ... ... ... and then I got this error
>
>java.lang.NoClassDefFoundError
>Any suggestions!

Ouch. I'd written the calls within try{...}catch(Exception ex){out.write...}
blocks, expecting this to catch any exceptions---and it would have. Unfortunately,
java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError do
_not_ extend Exception, they extend Throwable. So I've just editted the code to
replace those two Exceptions with Throwable; that should prevent collapse.
Thanks for trying it.

The implication appears to be that Xerces is just not being found, unless it
means that Xerces 1.4.2 has dropped the framework.Version.fVersion system..so I
just downloaded Xerces 1.4.2 (source) and looked, and am not surprised because
it's still there. My suspicion is that the classpath you tried to set up is not 
the one you're getting, as happens all too often to people on this list.

Tom Myers

Re: help can't get services deployed

Posted by Tom Myers <to...@dreamscape.com>.
At 03:00 PM 7/26/2001 -0500, Rich Catlett wrote:
>I tried running the cp.jsp but I get a servlet exception with the root cause being this
>
>java.lang.ExceptionInInitializerError: java.lang.ClassCastException: 
>....
>I went into the jsp and edited it ... ... ... and then I got this error
>
>java.lang.NoClassDefFoundError
>Any suggestions!

Ouch. I'd written the calls within try{...}catch(Exception ex){out.write...}
blocks, expecting this to catch any exceptions---and it would have. Unfortunately,
java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError do
_not_ extend Exception, they extend Throwable. So I've just editted the code to
replace those two Exceptions with Throwable; that should prevent collapse.
Thanks for trying it.

The implication appears to be that Xerces is just not being found, unless it
means that Xerces 1.4.2 has dropped the framework.Version.fVersion system..so I
just downloaded Xerces 1.4.2 (source) and looked, and am not surprised because
it's still there. My suspicion is that the classpath you tried to set up is not 
the one you're getting, as happens all too often to people on this list.

Tom Myers

Re: help can't get services deployed

Posted by Rich Catlett <ri...@more.net>.
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
> 
> 


Re: help can't get services deployed

Posted by Rich Catlett <ri...@more.net>.
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
> 
> 


Re: help can't get services deployed

Posted by Tom Myers <to...@dreamscape.com>.
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



Re: help can't get services deployed

Posted by Tom Myers <to...@dreamscape.com>.
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



RE: help can't get services deployed

Posted by Gabriel G Nasser <co...@cs.bu.edu>.
make sure you are exporting your CLASSPATH variable.

-----Original Message-----
From: Rich Catlett [mailto:rich@more.net]
Sent: Thursday, July 26, 2001 13:36
To: soap-user@xml.apache.org
Subject: help can't get services deployed


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)
   at
org.apache.soap.server.http.ServerHTTPUtils.getServiceManagerFromContext(Ser
verHTTPUtils.java:103)
   at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:21
2)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

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.

Rich Catlett



RE: help can't get services deployed

Posted by Gabriel G Nasser <co...@cs.bu.edu>.
make sure you are exporting your CLASSPATH variable.

-----Original Message-----
From: Rich Catlett [mailto:rich@more.net]
Sent: Thursday, July 26, 2001 13:36
To: soap-user@xml.apache.org
Subject: help can't get services deployed


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)
   at
org.apache.soap.server.http.ServerHTTPUtils.getServiceManagerFromContext(Ser
verHTTPUtils.java:103)
   at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:21
2)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

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.

Rich Catlett