cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tagunov Anthony" <atagu...@nnt.ru>
Subject Re: XSP and Classloader Trouble
Date Thu, 15 Mar 2001 07:07:48 GMT
On Wed, 14 Mar 2001 18:07:17 -0500, Jonathan Fuerth wrote:

>On Wed, Mar 14, 2001 at 11:24:06PM +0300, Tagunov Anthony wrote:
>> On Wed, 14 Mar 2001 19:35:14 +0100 (CET), michele bianchi wrote:
>> >On Wed, 14 Mar 2001, Jonathan Fuerth wrote:
>> >> I'm using Tomcat 3.2.1 and Cocoon 1.8.2.  I want to be able to call my
>> >> own utility classes (which live within the web application context)
>> >> from an xsp page.  I think there's some sort of classloader problem
>> >> preventing me from doing this.  Details follow:
>> >> [...]
>> >> Does anyone have any hints?
>> >
>> >no way, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11
>> 
>> Not completely convinced :-)))))))
>
>> Try you luck with the latest Tomcat from the cvs, those that is going to become
>
>Ok, I will give it a go.  It would be nice to have this problem
>solved!
>
>> So, soon, really soon the bug 11 may be marked as resolved!
>> (The only thing that makes me worried is how stable those
>> Tomcat 3.3 from cvs is? They are going to release 3.2 in the
>> nearest future and until 3.3 will be called stable, i'm afraid time
>> may pass. So currently i'm not sure on what to use in production
>> environment.)
>
>Right, well production is an issue.  We're developing an application
>that we plan to try and sell (all bundled in a WAR file).. asking a
>customer to add our JARs to their servlet container's classpath might
>not go over so well.. :)
>
>Out of curiosity, how could this be a Tomcat bug? (I'm not saying it
>isn't: I'm just asking out of interest) .. My own servlets in the same
>Tomcat context are able to use those utility classes, and they even
>reload them automatically if I set "reloadable=true" in the server.xml
>file. I've actually been doing this for some time now, but today was
>the first time I felt the need to call one of these utilities from an
>xsp.

Well, there's been an extensive discussion on tomcat-dev on the
issue, here are some letters from those thread:

http://mikal.org/interests/java/tomcat/archive/view?mesg=22444
http://mikal.org/interests/java/tomcat/archive/view?mesg=22494

So you can see that those problems are related to Cocoon being
on the Tomcat classpath. What reason Cocoon resides on the
system classpath i do not quite get now, but that was sure due
to some serious problems. (Anyone can remind me?)

But looks like with the latest Tomcats these problems are gone
and we now can put evrything (all jar: Xerces, Xalan,
cocoon.jar) into WEB-INF/lib

At least that is what Krzysztof Zielinski <kzielinski@supermedia.pl>
reported. Is his site http://ziel.sm.pl/ still down? It was up two days
ago running some tomcat 3.3-cvs+C1+C2 and the cocoons ran
there as _pure_ webapps.

BTW: this problem of "upper" (system?) classloader not being able
load from jars in WEB-INF/lib and classes from WEB-INF/classes
hits servlet developers on Tomcat very often.
Here's one more example:
http://mikal.org/interests/java/tomcat/archive/view?mesg=22448

People run into troubles with EJB's (from JBoss) trying to deserialize
something that resides in WEB-INF/lib as JBoss classes are on the
system classpath.. Some work is under way to build-in some
EJB capabilities into TC4, but i'm not strong at that so i can not
comment on how well Tomcat integrates with, say JBoss..

Anyway a work-around solution in the cases you can not
invent anything better is to put all that has to communicate
in the system classpath..

>Thanks for all the suggestions, everyone!
>
>-Jonathan Fuerth





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message