You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Cheng Hao <ha...@hotmail.com> on 2003/05/06 08:17:11 UTC
weird server side problem in Apache SOAP
hello, I encounter a weird problem in SOAP ...
I have the SOAP server and client, in the server side, I defined the
following interface
-- String getUpdateVersion()
-- String getAppListVersion()
and it works fine when the client invoke such functions.
However, after I add one more interface into the SOAP component,
-- DataHandler getSingleFile()
I got this error message when I run from the client side
-- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
[faultString=javax/activation/DataSource]
[faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
The weird thing is that I didn't change my client program, that is, I
didn't even call the getSingleFile() function (which seems to cause the
trouble) ... i double checked that the serilization of DataHandler has been
taken cared of SOAP already ..
I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
of urgent now ...
Greatly appreciate it !!
John
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
Re: weird server side problem in Apache SOAP
Posted by Scott Nichol <sn...@scottnichol.com>.
If the deployment descriptor for your service includes
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultL
istener>
then the stack trace of the exception is returned in the SOAP fault.
The stack trace can be viewed on the client by writing the stringized
exception (i.e. e.toString(), where e is the exception). Many pieces
of client code grab only some pieces of the exception to print. You
will do yourself a favor to print the toString() so that everything
is dumped.
On 6 May 2003 at 21:33, John Wang wrote:
> thanks so much ... after adding the classpath of "activation.jar", my problem dissappeared...
>
> Just wondering if the SOAP server side could throw me an exception like "Class not found: DataHandler", it'll be much easier for me to find out the problem :-)
>
> Cheers.
>
> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@ws.apache.org>
> Sent: Tuesday, May 06, 2003 9:14 PM
> Subject: Re: weird server side problem in Apache SOAP
>
>
> The error appears on the client, but it was generated as a SOAP Fault
> on the server. I believe the server cannot load class DataSource
> from activation.jar. Are you sure activation.jar is available on the
> server?
>
> On 6 May 2003 at 14:17, Cheng Hao wrote:
>
> > hello, I encounter a weird problem in SOAP ...
> >
> > I have the SOAP server and client, in the server side, I defined the
> > following interface
> >
> > -- String getUpdateVersion()
> > -- String getAppListVersion()
> >
> > and it works fine when the client invoke such functions.
> >
> > However, after I add one more interface into the SOAP component,
> >
> > -- DataHandler getSingleFile()
> >
> > I got this error message when I run from the client side
> >
> > -- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
> > [faultString=javax/activation/DataSource]
> > [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
> >
> > The weird thing is that I didn't change my client program, that is, I
> > didn't even call the getSingleFile() function (which seems to cause the
> > trouble) ... i double checked that the serilization of DataHandler has been
> > taken cared of SOAP already ..
> >
> > I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
> > of urgent now ...
> >
> > Greatly appreciate it !!
> >
> > John
> >
> >
> >
> > _________________________________________________________________
> > ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
> >
> >
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.
Re: weird server side problem in Apache SOAP
Posted by John Wang <ha...@hotmail.com>.
thanks so much ... after adding the classpath of "activation.jar", my problem dissappeared...
Just wondering if the SOAP server side could throw me an exception like "Class not found: DataHandler", it'll be much easier for me to find out the problem :-)
Cheers.
----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@ws.apache.org>
Sent: Tuesday, May 06, 2003 9:14 PM
Subject: Re: weird server side problem in Apache SOAP
The error appears on the client, but it was generated as a SOAP Fault
on the server. I believe the server cannot load class DataSource
from activation.jar. Are you sure activation.jar is available on the
server?
On 6 May 2003 at 14:17, Cheng Hao wrote:
> hello, I encounter a weird problem in SOAP ...
>
> I have the SOAP server and client, in the server side, I defined the
> following interface
>
> -- String getUpdateVersion()
> -- String getAppListVersion()
>
> and it works fine when the client invoke such functions.
>
> However, after I add one more interface into the SOAP component,
>
> -- DataHandler getSingleFile()
>
> I got this error message when I run from the client side
>
> -- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
> [faultString=javax/activation/DataSource]
> [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
>
> The weird thing is that I didn't change my client program, that is, I
> didn't even call the getSingleFile() function (which seems to cause the
> trouble) ... i double checked that the serilization of DataHandler has been
> taken cared of SOAP already ..
>
> I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
> of urgent now ...
>
> Greatly appreciate it !!
>
> John
>
>
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
>
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.
Re: weird server side problem in Apache SOAP
Posted by Scott Nichol <sn...@scottnichol.com>.
This sounds like an issue in the way Apache SOAP and your service
classes are deployed within the servlet container.
Basically, with "modern" containers that support recent J2EE specs,
Apache SOAP should be deployed as a webapp. For example, with Tomcat
4 you can simply place soap.war into $CATALINA_HOME/webapps. The
classes for your services should be added to the webapp. For Tomcat,
this would mean placing them in $CATALINA_HOME/webapps/soap/WEB-
INF/classes.
You cannot deploy Apache SOAP as a webapp and your service classes as
a separate webapp. You will also run into trouble if you deploy
Apache SOAP as a webapp, then put your service classes in a common or
global directory, such as $CATALINA_HOME/classes with Tomcat. The
reverse, putting your service classes in a webapp and soap.jar in
$CATALINA_HOME/lib, causes problems as well.
I am not sure what container you are using or how you have deployed
things, but unless you have a specific reason to do otherwise, Apache
SOAP and your service classes should be deployed into a single
webapp.
On 8 May 2003 at 14:20, John Wang wrote:
> Hi, Scott, your suggestion precisely answered my problem after I added "activation.jar" on my classpath.
>
> Now I have another exception as following in running the my client --
>
> --------------------
> Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server] [faultString=Exception from service object: org/apache/soap/util/mime/ByteArrayDataSource] [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
> -------------------
>
> I tried a similiar way, that is, to put the soap.jar in my classpath, and I've got even more exceptions as below, any suggestions? Many thanks.
>
> John
>
> -------------------
> [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type "text/html; charset=GB2312", must be: "text/xml". Response was:
> <html><head><title>Apache Tomcat/4.1.24 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family :
sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade><p><b>type</b> Exception
report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b>
<pre>javax.servlet.ServletException: Error allocating a servlet instance
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:672)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
> at java.lang.Thread.run(Thread.java:536)
> </pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:885)
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
>
>
>
>
>
> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@ws.apache.org>
> Sent: Tuesday, May 06, 2003 9:14 PM
> Subject: Re: weird server side problem in Apache SOAP
>
>
> The error appears on the client, but it was generated as a SOAP Fault
> on the server. I believe the server cannot load class DataSource
> from activation.jar. Are you sure activation.jar is available on the
> server?
>
> On 6 May 2003 at 14:17, Cheng Hao wrote:
>
> > hello, I encounter a weird problem in SOAP ...
> >
> > I have the SOAP server and client, in the server side, I defined the
> > following interface
> >
> > -- String getUpdateVersion()
> > -- String getAppListVersion()
> >
> > and it works fine when the client invoke such functions.
> >
> > However, after I add one more interface into the SOAP component,
> >
> > -- DataHandler getSingleFile()
> >
> > I got this error message when I run from the client side
> >
> > -- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
> > [faultString=javax/activation/DataSource]
> > [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
> >
> > The weird thing is that I didn't change my client program, that is, I
> > didn't even call the getSingleFile() function (which seems to cause the
> > trouble) ... i double checked that the serilization of DataHandler has been
> > taken cared of SOAP already ..
> >
> > I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
> > of urgent now ...
> >
> > Greatly appreciate it !!
> >
> > John
> >
> >
> >
> > _________________________________________________________________
> > ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
> >
> >
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.
Re: weird server side problem in Apache SOAP
Posted by John Wang <ha...@hotmail.com>.
Hi, Scott, your suggestion precisely answered my problem after I added "activation.jar" on my classpath.
Now I have another exception as following in running the my client --
--------------------
Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server] [faultString=Exception from service object: org/apache/soap/util/mime/ByteArrayDataSource] [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
-------------------
I tried a similiar way, that is, to put the soap.jar in my classpath, and I've got even more exceptions as below, any suggestions? Many thanks.
John
-------------------
[SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type "text/html; charset=GB2312", must be: "text/xml". Response was:
<html><head><title>Apache Tomcat/4.1.24 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Error allocating a servlet instance
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:672)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
</pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:885)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@ws.apache.org>
Sent: Tuesday, May 06, 2003 9:14 PM
Subject: Re: weird server side problem in Apache SOAP
The error appears on the client, but it was generated as a SOAP Fault
on the server. I believe the server cannot load class DataSource
from activation.jar. Are you sure activation.jar is available on the
server?
On 6 May 2003 at 14:17, Cheng Hao wrote:
> hello, I encounter a weird problem in SOAP ...
>
> I have the SOAP server and client, in the server side, I defined the
> following interface
>
> -- String getUpdateVersion()
> -- String getAppListVersion()
>
> and it works fine when the client invoke such functions.
>
> However, after I add one more interface into the SOAP component,
>
> -- DataHandler getSingleFile()
>
> I got this error message when I run from the client side
>
> -- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
> [faultString=javax/activation/DataSource]
> [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
>
> The weird thing is that I didn't change my client program, that is, I
> didn't even call the getSingleFile() function (which seems to cause the
> trouble) ... i double checked that the serilization of DataHandler has been
> taken cared of SOAP already ..
>
> I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
> of urgent now ...
>
> Greatly appreciate it !!
>
> John
>
>
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
>
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.
Re: weird server side problem in Apache SOAP
Posted by Scott Nichol <sn...@scottnichol.com>.
The error appears on the client, but it was generated as a SOAP Fault
on the server. I believe the server cannot load class DataSource
from activation.jar. Are you sure activation.jar is available on the
server?
On 6 May 2003 at 14:17, Cheng Hao wrote:
> hello, I encounter a weird problem in SOAP ...
>
> I have the SOAP server and client, in the server side, I defined the
> following interface
>
> -- String getUpdateVersion()
> -- String getAppListVersion()
>
> and it works fine when the client invoke such functions.
>
> However, after I add one more interface into the SOAP component,
>
> -- DataHandler getSingleFile()
>
> I got this error message when I run from the client side
>
> -- Generated fault: [Attributes={}] [faultCode=SOAP-ENV:Server.Exception:]
> [faultString=javax/activation/DataSource]
> [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]
>
> The weird thing is that I didn't change my client program, that is, I
> didn't even call the getSingleFile() function (which seems to cause the
> trouble) ... i double checked that the serilization of DataHandler has been
> taken cared of SOAP already ..
>
> I'm using Apache SOAP 2.3.1, could someone throw me some light? It's kind
> of urgent now ...
>
> Greatly appreciate it !!
>
> John
>
>
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
>
>
Scott Nichol
Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.