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 ji...@philips.com on 2000/11/03 23:03:10 UTC

Problem in the addressbook sample application

I have deployed the addressbook service on the server side. It is running OK.

I got right responses when I made requests of GetAllListings and PutListings. But I got the following error message when I made a request by running GetAddress.
org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
        at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
        at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:625)
        at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:679)
        at org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1496)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
        at org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
        at org.apache.soap.rpc.Call.invoke(Call.java:157)
        at samples.addressbook.GetAddress.main(GetAddress.java:127)
Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
<h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet Error:</b><br>
<pre>
javax.servlet.ServletException: Error building response envelope
        at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:345)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
        at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
        at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
        at java.lang.Thread.run(Unknown Source)
</pre>
<b>Root cause:</b>
<pre>
java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.w3c.dom.Element' using encoding style 'http://schema
s.xmlsoap.org/soap/encoding/'.
        at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappingRegistry.java:125)
        at org.apache.soap.encoding.SOAPMappingRegistry.querySerializer(SOAPMappingRegistry.java:297)
        at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSerializer.java:98)
        at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
        at org.apache.soap.Body.marshall(Body.java:141)
        at org.apache.soap.Envelope.marshall(Envelope.java:180)
        at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:343)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
        at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
        at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
        at java.lang.Thread.run(Unknown Source)
</pre>

I'll appreciate it if any of you help me or give me some hints.

Jingkun 

NoSuchMethodError for getNamespaceURI()

Posted by William McKenzie <ws...@cartewright.com>.
Just can't seem to find this method.  I'm using xerces 1.2.1; classpath as
follows:

set CLASSPATH=.;c:\xerces-1_2_1\xerces.jar;c:\soap-2_0\lib\soap.jar

I've removed the default xml jar file from my jre directory (i'm using
jdk1.3 with the default jre). I am able to make a call successfully, but
then get this when trying to unmarshall the results:

Exception in thread "main" java.lang.NoSuchMethodError
        at org.apache.soap.util.xml.QName.<init>(QName.java:80)
        at org.apache.soap.util.xml.QName.matches(QName.java:146)
        at org.apache.soap.Envelope.unmarshall(Envelope.java:210)
        at org.apache.soap.rpc.Call.invoke(Call.java:172)
        at test.main(test.java:30)

the method in question is Node.getNamespaceURI.  The obvious probability is
that i'm pointing at some not DOM2 org.w3c classes.  But where could they be
coming from?

~Bill

William (Bill) McKenzie
CarteWright, Inc.
wsmckenz@cartewright.com
8324436258@messaging.sprintpcs.com - page
(713) 807-0817 Office
(832) 443-6258 Mobile
(713) 754-2541 Chevron


NoSuchMethodError for getNamespaceURI()

Posted by William McKenzie <ws...@cartewright.com>.
Just can't seem to find this method.  I'm using xerces 1.2.1; classpath as
follows:

set CLASSPATH=.;c:\xerces-1_2_1\xerces.jar;c:\soap-2_0\lib\soap.jar

I've removed the default xml jar file from my jre directory (i'm using
jdk1.3 with the default jre). I am able to make a call successfully, but
then get this when trying to unmarshall the results:

Exception in thread "main" java.lang.NoSuchMethodError
        at org.apache.soap.util.xml.QName.<init>(QName.java:80)
        at org.apache.soap.util.xml.QName.matches(QName.java:146)
        at org.apache.soap.Envelope.unmarshall(Envelope.java:210)
        at org.apache.soap.rpc.Call.invoke(Call.java:172)
        at test.main(test.java:30)

the method in question is Node.getNamespaceURI.  The obvious probability is
that i'm pointing at some not DOM2 org.w3c classes.  But where could they be
coming from?

~Bill

William (Bill) McKenzie
CarteWright, Inc.
wsmckenz@cartewright.com
8324436258@messaging.sprintpcs.com - page
(713) 807-0817 Office
(832) 443-6258 Mobile
(713) 754-2541 Chevron


Re: Problem in the addressbook sample application

Posted by chuck clark <cc...@ziclix.com>.
check your servlet engine and make sure it is using DOM level 2

this generally occurs when the servlet engine loads the version of the DOM it uses first..if it is an engine using a level 1 DOM then when the SOAP classes ask for
an instance of Element a level 1 Element is serverd and the SOAP framework tries to call a method added in Level 2 and BAM!  the crazy error you see comes out of
it

in resin and JRun there are properties files you modify to put xerces with level 2 DOM support at the very beginning of the CLASSPATH...one of the tomcat users
might be able to tell you how to do it on that

chuck

jingkun.hu@philips.com wrote:

> I have deployed the addressbook service on the server side. It is running OK.
>
> I got right responses when I made requests of GetAllListings and PutListings. But I got the following error message when I made a request by running GetAddress.
> org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
>         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
>         at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:625)
>         at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:679)
>         at org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1496)
>         at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
>         at org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
>         at org.apache.soap.rpc.Call.invoke(Call.java:157)
>         at samples.addressbook.GetAddress.main(GetAddress.java:127)
> Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
> <h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet Error:</b><br>
> <pre>
> javax.servlet.ServletException: Error building response envelope
>         at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:345)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
>         at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
>         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>         at java.lang.Thread.run(Unknown Source)
> </pre>
> <b>Root cause:</b>
> <pre>
> java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.w3c.dom.Element' using encoding style 'http://schema
> s.xmlsoap.org/soap/encoding/'.
>         at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappingRegistry.java:125)
>         at org.apache.soap.encoding.SOAPMappingRegistry.querySerializer(SOAPMappingRegistry.java:297)
>         at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSerializer.java:98)
>         at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
>         at org.apache.soap.Body.marshall(Body.java:141)
>         at org.apache.soap.Envelope.marshall(Envelope.java:180)
>         at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:343)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
>         at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
>         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>         at java.lang.Thread.run(Unknown Source)
> </pre>
>
> I'll appreciate it if any of you help me or give me some hints.
>
> Jingkun


Re: Problem in the addressbook sample application

Posted by chuck clark <cc...@ziclix.com>.
check your servlet engine and make sure it is using DOM level 2

this generally occurs when the servlet engine loads the version of the DOM it uses first..if it is an engine using a level 1 DOM then when the SOAP classes ask for
an instance of Element a level 1 Element is serverd and the SOAP framework tries to call a method added in Level 2 and BAM!  the crazy error you see comes out of
it

in resin and JRun there are properties files you modify to put xerces with level 2 DOM support at the very beginning of the CLASSPATH...one of the tomcat users
might be able to tell you how to do it on that

chuck

jingkun.hu@philips.com wrote:

> I have deployed the addressbook service on the server side. It is running OK.
>
> I got right responses when I made requests of GetAllListings and PutListings. But I got the following error message when I made a request by running GetAddress.
> org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
>         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
>         at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:625)
>         at org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:679)
>         at org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1496)
>         at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
>         at org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
>         at org.apache.soap.rpc.Call.invoke(Call.java:157)
>         at samples.addressbook.GetAddress.main(GetAddress.java:127)
> Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
> <h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet Error:</b><br>
> <pre>
> javax.servlet.ServletException: Error building response envelope
>         at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:345)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
>         at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
>         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>         at java.lang.Thread.run(Unknown Source)
> </pre>
> <b>Root cause:</b>
> <pre>
> java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.w3c.dom.Element' using encoding style 'http://schema
> s.xmlsoap.org/soap/encoding/'.
>         at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappingRegistry.java:125)
>         at org.apache.soap.encoding.SOAPMappingRegistry.querySerializer(SOAPMappingRegistry.java:297)
>         at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSerializer.java:98)
>         at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
>         at org.apache.soap.Body.marshall(Body.java:141)
>         at org.apache.soap.Envelope.marshall(Envelope.java:180)
>         at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:343)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
>         at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
>         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>         at java.lang.Thread.run(Unknown Source)
> </pre>
>
> I'll appreciate it if any of you help me or give me some hints.
>
> Jingkun