cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Cocoon producers and Tomcat
Date Fri, 17 Mar 2000 12:19:32 GMT
Darryl Stoflet wrote:
> 
> Stephano,

Stefano, please
 
>         I sent in a report to bugzilla that I thought addressed this and
> offered a remedy. If cocoon is in the classpath (as it is in the
> howto installation guides) it will be loaded by the system class
> loader, which knows nothing about the web-inf/classes or web-inf/lib
> directories. Thus when cocoon trys to load classes or any resource not
> in the system classpath it will fail, as the example below does
> when a producer is placed in the web-inf/classes directory.
> The 2 solutions are to either place all resources and classes in the
> system classpath including cocoon, or put cocoon in a web-inf directory
> and then it will be able to see the resources and classes in that
> contexts web-inf/classes and web-inf/lib directory as well as the system
> classpath. If you opt to enable placing cocoon in web-inf/classes
> you must also refrain from the usage of ClassLoader.getSystemResource()
> as it will use the system classloader. Instead use
> getClass().getClassLoader().getResource.

Already patched this but it doesn't work. I suspect a bug in the
JServ/Tomcat classloader implementation even if this seems very strange.

I'll play around more with it today.
 
> /Darryl Stoflet
> 
> Stefano Mazzocchi wrote:
> >
> > Kevin Jones wrote:
> > >
> > > if I'm using Cocoon from within Tomcat (the latest 3.1 build). If I add a
> > > producer to the cocoon.properties file I get the following
> > >
> > > java.lang.RuntimeException: Error creating
> > > kevinj.develop.util.WeatherProducer: class is not found
> > >
> > > I've put the class (package and all) under WEB-INF/classes, so the question
> > > is, where does Cocoon expect to find the producer class (or am I missing
> > > something else?) ?
> >
> > I am currently trying to address the classloading/resourceloading
> > problems in Cocoon 1.7.1-dev to make it possible to use it in Tomcat or
> > under a specific jserv servlet zone.
> >
> > The problem is that classloader behavior is a real pain in the ass,
> > expecially between 1.1 and 1.2 java versions.
> >
> > But today I'll install tomcat 3.1b and see what happens.
> >
> > --
> > Stefano Mazzocchi      One must still have chaos in oneself to be
> >                           able to give birth to a dancing star.
> > <stefano@apache.org>                             Friedrich Nietzsche
> > --------------------------------------------------------------------
> >  Come to the first official Apache Software Foundation Conference!
> > ------------------------- http://ApacheCon.Com ---------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> --
> Darryl Stoflet
> http://dstoflet.calweb.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message