Re: Tomcat classloader problem?

2001-11-30 Thread Chris Malley

Glenn Nielsen wrote:
 

 
   Chris Malley wrote:
[...]
   I'm experiencing a problem with SOAP message-style services
   when using Tomcat 4.01.  When trying to access any message-style
   SOAP service, my client receives a no signature match fault.

[...]
  Moving soap.jar to $CATALINA_HOME/webapps/soap/WEB-INF/lib/soap.jar should
  solve the problem, and could be used as a workaround. Alternately, you can
  remove from $CATALINA_HOME/webapps/soap/WEB-INF/classes/ the classes which
  are also present in the JAR.
 
  Note: I don't consider this a Catalina problem, but more a questionable
  packaging choice of the SOAP binary.
 
  Remy
 
 
 I agree with Remy, we use soap2.2 in Tomcat 4.01 just by installing
 the soap.war file.
 
 Glenn


-- 
Chris Malley
PixelZoom, Inc. Voice: +1.303.494.8849
835 Orman Drive EMail: [EMAIL PROTECTED]
Boulder CO 80303-2616

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Tomcat classloader problem?

2001-11-30 Thread Chris Malley

Chris Malley wrote:
[...]
 I'm experiencing a problem with SOAP message-style services
 when using Tomcat 4.01.  When trying to access any message-style
 SOAP service, my client receives a no signature match fault.
[...]

Remy Maucherat wrote:
[...]
  Moving soap.jar to $CATALINA_HOME/webapps/soap/WEB-INF/lib/soap.jar should
  solve the problem, and could be used as a workaround. Alternately, you can
  remove from $CATALINA_HOME/webapps/soap/WEB-INF/classes/ the classes which
  are also present in the JAR.

Glenn Nielsen wrote:
 
 I agree with Remy, we use soap2.2 in Tomcat 4.01 just by installing
 the soap.war file.
 
 Glenn

Glenn: Are you using message-style SOAP services, or RPC-style?
 
Using only soap.war does indeed work just fine for RPC-style,
but I get the SOAP fault shown below for message-style services;
org.apache.soap.Envelope isn't found.

Suggestions?

-Chris


?xml version='1.0' encoding='UTF-8'?
SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/1999/XMLSchema;
SOAP-ENV:Body
SOAP-ENV:Fault
faultcodeSOAP-ENV:Server/faultcode
faultstringException while handling service request:
org/apache/soap/Envelope
/faultstring
faultactor/soap/servlet/messagerouter/faultactor
detail
stackTracejava.lang.NoClassDefFoundError: org/apache/soap/Envelope
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:888)
at
org.apache.soap.util.MethodUtils.getEntryPoint(MethodUtils.java:114)
at
org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:548)
at
org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:528)
[...]
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)
/stackTrace
/detail
/SOAP-ENV:Fault
/SOAP-ENV:Body
/SOAP-ENV:Envelope 


-- 
Chris Malley
PixelZoom, Inc. Voice: +1.303.494.8849
835 Orman Drive EMail: [EMAIL PROTECTED]
Boulder CO 80303-2616

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Tomcat classloader problem?

2001-11-29 Thread Chris Malley

I'm hoping someone here can help me with this. The folks
on soap-user directed me to tomcat-user, and the tomcat-user
folks suggested I try tomcat-dev.  So here I am...

I'm experiencing a problem with SOAP message-style services 
when using Tomcat 4.01.  When trying to access any message-style 
SOAP service, my client receives a no signature match fault.
I have no problem with RPC-style SOAP services, the same 
message-style SOAP services work fine with Tomcat 3.2.3, 
and the signature of the my message-style services is of 
the correct form; ie:

  public void serviceName( Envelope env, SOAPContext req, SOAPContext
res )
throws IOException, MessagingException;

What makes me think that this may be a Tomcat classloader 
problem is that I can make the fault go away by removing
$CATALINA_HOME/webapps/soap/WEB-INF/classes/org/.
But I don't understand why this makes the fault go away,
and it's clearly an unacceptable hack.

I've attached the following:
  details.txt-- detailed problem description
  echomsg.tar.gz -- a simple example
details

Any help in correcting/understanding this will be appreciated.
Sorry for the size of this post, but I'm trying to provide all
of the details necessary to resolve this.  Thanks,

-Chris

-- 
Chris Malley
PixelZoom, Inc. Voice: +1.303.494.8849
835 Orman Drive EMail: [EMAIL PROTECTED]
Boulder CO 80303-2616


ABOUT MY SOAP SERVICE ...

'echomsg' is a SOAP message-style service that simply echoes a string 
that it receives from the SOAP client. For example...

Here's what the client sends:

  ?xml version='1.0' encoding='UTF-8'?
  s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/;
s:Body
  echo xmlns=urn:echomsghello/echo
/s:Body
  /s:Envelope

Here's how the server responds:

  ?xml version='1.0' encoding='UTF-8'?
  s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/;
s:Body
  responsehello/response
/s:Body
  /s:Envelope

Here's the signature of the method that implements the service:

  public void echo( Envelope env, SOAPContext req, SOAPContext res )
throws IOException, MessagingException;


ABOUT MY PLATFORM ...

  Tomcat 4.0.1
  Apache SOAP 2.2
  JDK 1.3.1_01
  Linux 2.2.12-20 kernel


SET UP ...

Install Tomcat 4.01 and Apache SOAP 2.2:

 (1) Install Tomcat 4.01 in $CATALINA_HOME
 (2) Install Apache SOAP 2.2 in $SOAP_HOME
 (3) cp $SOAP_HOME/lib/soap.jar to $CATALINA_HOME/lib/
 (4) cp $SOAP_HOME/webapps/soap.war to $CATALINA_HOME/webapps/

CLASSPATH is set in the provided Makefile.  I do not have CLASSPATH
set in my shell environment, and I have not changed any of the Tomcat
config files.

Build the SOAP service.  

 (5) tar xzvf echomsg.tar.gz
 (6) cd echomsg
 (7) make
 
Deploy the SOAP service:

 (8) make install
 (9) $CATALINA_HOME/bin/startup.sh
 (10) make deploy


DEMONSTRATING THE PROBLEM ...

Run the SOAP client:

 make test 
 
The SOAP response contains this faultstring:

 faultstringException while handling service request: 
echomsg.Server.echo(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.rpc.SOAPContext)
-- no signature match/faultstring

Again, this is a message-style service that works just fine with
Tomcat 3.2.3.  And (see below) I can make it work with Tomcat 4.01
if I resort to hacks.

On [EMAIL PROTECTED], it was suggested that this problem 
was due to the presence of multiple copies of soap.  The solutions
suggested were to either:
 (a) remove $CATALINA_HOME/lib/soap.jar, or
 (b) remove $CATALINA_HOME/webapps/soap/WEB-INF/classes/org/
 
Method (a) doesn't work; it results in Tomcat not being able to 
handle SOAP service requests since it doesn't know about the 
soap servlet.  

To try method (b), here's what I did: 

 (1) $CATALINA_HOME/bin/shutdown.sh
 (2) rm -rf $CATALINA_HOME/webapps/soap/WEB-INF/classes/org/
 (3) $CATALINA_HOME/bin/startup.sh
 (4) make test

Method (b) does work, but it's an unacceptable hack.  And I still
don't understand what the original problem is.
 
**




echomsg.tar.gz
Description: GNU Zip compressed data

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Re: Tomcat classloader problem?

2001-11-29 Thread Chris Malley

Thanks, now I understand what's going on (though I
still don't understand how it manifests itself as a
no signature match for my service).

While I've always thought that the packaging of the SOAP
binary was a little strange, one could also argue
that the Catalina classloader could be a bit smarter
about things like this.

In any case, judging by the number of people who have 
contacted me since I posted, I'm not the only one 
experiencing this problem.  It should at least be 
documented in some hopefully-soon-to-be-written
installing Apache SOAP 2.2 with Tomcat 4 doc.

How do you suggest that this be resolved?
Should I bring this to the attention of someone
in particular in the Apache SOAP group?

-Chris 


Remy Maucherat wrote:

  I'm experiencing a problem with SOAP message-style services
  when using Tomcat 4.01.  When trying to access any message-style
  SOAP service, my client receives a no signature match fault.
[...]
 
 The problem is that there are class conflicts, as half of the SOAP classes
 are in the webapp CL, and will be loaded from there (since the CL won't
 delegate), and the rest will be loaded from the shared CL. The conflicts
 will occur because the SOAP classes loaded from the shared CL will also load
 a different copy of the same SOAP classes from soap.jar.
 
 Moving soap.jar to $CATALINA_HOME/webapps/soap/WEB-INF/lib/soap.jar should
 solve the problem, and could be used as a workaround. Alternately, you can
 remove from $CATALINA_HOME/webapps/soap/WEB-INF/classes/ the classes which
 are also present in the JAR.
 
 Note: I don't consider this a Catalina problem, but more a questionable
 packaging choice of the SOAP binary.
 
 Remy


-- 
Chris Malley
PixelZoom, Inc. Voice: +1.303.494.8849
835 Orman Drive EMail: [EMAIL PROTECTED]
Boulder CO 80303-2616

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]