Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 12331 invoked from network); 17 Mar 2000 16:42:19 -0000 Received: from pop.systemy.it (194.20.140.28) by locus.apache.org with SMTP; 17 Mar 2000 16:42:19 -0000 Received: from apache.org (pv14-pri.systemy.it [194.21.255.14]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id RAA17256 for ; Fri, 17 Mar 2000 17:42:15 +0100 Message-ID: <38D222D4.5D99AF23@apache.org> Date: Fri, 17 Mar 2000 13:19:32 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.72 [en] (Win98; I) X-Accept-Language: it,en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: Cocoon producers and Tomcat References: <38D0EE05.802E2D25@apache.org> <38D179A5.772ECB66@calweb.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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. > > 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. Friedrich Nietzsche -------------------------------------------------------------------- Missed us in Orlando? Make it up with ApacheCON Europe in London! ------------------------- http://ApacheCon.Com ---------------------