Yes, I have the same feeling like you about that situation.

The problem you had seems to have the same origin as the problem I met with
a web app, and other people too. I think that you have clearly exposed the
reason of that strange behavior.

I hope that this problem will be addressed for the newer versions, by
someone which has a good knowledge of this part of the Apache
implementation. For now, we have a better workaround than modifying the
engine's classpath.

Christian Bernard

-----Original Message-----
From: Andreas Ullmann [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 1:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Class Loading in SOAP/Tomcat - seems to be a bug


Seems that this is a bug in apaches SOAP.

Because:

I tried to acces an EJB which is running in Weblogic 6 via a JavaBean
accessed
from the RPCRouter.
The JavaBean wasn't able to get a reference an the EJB, although the JNDI
lookup
was successfully.

After a looooooooong period of trying around I copied the EJB-Jar into
\webapps\myapp\WEB-INF\lib where the soap.jar was allready located.
After that it worked!

The reason for that is that the apaches soap puzzles things with the
classloader. Apache does not correctly handle the inheritance hierarchie of
the
classloader as needed for application servers. So it was only possible to
access
the EJB, because the EJB-jar and the SOAP-jar were both loaded from the same
classloader.


Andreas Ullmann

Christian Bernard wrote:

> Hi All,
>
> I've recently noticed some very interesting things about that problem.
Here
> are the facts :
>
> 0. Suppose Your Web Service application is deployed at
> %TOMCAT_HOME%\webapps\myapp.
>
> 1. It's not necessary to add the statement set
> CP=%CP%;%TOMCAT_HOME%\webapps\myapp\WEB-INF\classes to the tomcat.bat file
> if you add the soap.jar, activation.jar and mail.jar to your
> %TOMCAT_HOME%\webapps\myapp\WEB-INF\lib. If you do that, you will not get
> the message "BadTargetObjectURI - Unable to resolve target object" for
which
> I reported to the SOAP list.
> In this case, you should have a classpath which looks like this one :
>
> Using CLASSPATH:
>
C:\Xerces_1.4.0\xerces.jar;..\classes;..\lib\ant.jar;..\lib\jasper.jar;..\li
>
b\jaxp.jar;..lib\parser.jar;..\lib\servlet.jar;..\lib\webserver.jar;C:\Jdk1.
> 3.0\lib\tools.jar
>
> 2. If you dont put these jars in your lib directory, it's mandatory to add
> the statement set CP=%CP%;%TOMCAT_HOME%\webapps\myapp\WEB-INF\classes to
the
> tomcat.bat file. Otherwise, you will get the well-known message
> "BadTargetObjectURI - Unable to resolve target object". This was my first
> solution.
>
> The first point is very interesting for the deployment phase, because it's
> not necessary to modify the engine's classpath to deploy a new web
service.
> It makes it possible to have several web services in the same engine which
> don't use the same SOAP implementation version, and to deploy them by
> packaging war files. The only change to make to the original engine's
> classpath is to add the xerces.jar in the front of the classpath as stated
> in the Apache SOAP documentation.
>
> I've made these tests with the Sun's JDK 1.3.0 and 1.2.2-006 on a Windows
> 2000 Professionnal workstation with the Apache Tomcat 3.2.2 engine and the
> Apache SOAP 2.1 implementation.
>
> Christian BERNARD
> NAGORA Technologies
>
> -----Original Message-----
> From: Christian Bernard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Class Loading in SOAP/Tomcat
>
> Hi Javier,
>
> I met the same problem with Tomcat 3.2.1 and Apache SOAP 2.1.
> The normal way to deploy a web application, as stated in the Servlets API
> specification is to use the war files and to place them under the
"webapps"
> directory of the server. When a user asks for a resource located in the
war
> file for the first time, the server engine first extracts the war file
> content under the "webapps" directory and then passes the control to the
> application. If the application needs a class from the newly deployed
> application, the server engine first search the class into the local
> application context (application classpath), and then if not found search
> into the global context (server classpath). By this way, the new web
> application may be deployed without stopping the server.
> Tomcat has implemented this operation mode.
> This is broken when the web application contains a Web Service and uses
the
> SOAP package. The class(es) which implement the Web Service must be added
> into the server classpath. If this is not done, the BadTargetObjectURI
error
> "Unable to resolve target object" is raised. This is a bad thing because,
> it's now mandatory to stop the web server to deploy such an application.
> I think the problem is located in the manner that the SOAP package uses to
> create the Web Service class instances. I don't know if there is a simple
> solution to that problem.
>
> Christian BERNARD
> NAGORA Technologies
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Javier A. Soltero
> Sent: Wednesday, June 06, 2001 10:28 PM
> To: [EMAIL PROTECTED]
> Subject: Class Loading in SOAP/Tomcat
>
> Hi All,
>
> I have a question regarding how classes which are made available via the
> soap interface are loaded by Apache Soap when soap runs inside the
> Tomcat 3.2 container. Essentially, I would like to package my soap
> server application as a war file which will be deployed into Tomcat. My
> expectation would be that when the RPCRouter is going to instantiate a
> class called via SOAP, it will be able to do so solely by looking at the
> classes that were packaged in the war file. In trying to prove this,
> I have found that SOAP (or perhaps Tomcat) requires any class which is
> going to be loaded by it to be in the classpath which *started* tomcat.
> This makes it difficult to be able to package SOAP server applications
> which can just be dropped into Tomcat (or any other Servlet container)
> without having to modify the classpath with which the container is
> started.
>
> Does anyone out there have any experience/knowledge about the expected
> behaviour? Is this question outside the scope of SOAP and more directly
> related to Tomcat's class loader?
>
> any help or insight greatly appreciated.
>
> -javier
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

Reply via email to