You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <gi...@apache.org> on 2006/07/13 10:04:54 UTC
Classloading issue in 2.2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
After again playing around a bit with 2.2 I have a strange issue with
the new shielded classloading stuff.
Give you have 'cocoon:deploy' the cocoon-webapp module and copied it
into a standalone jetty/tomcat webapps directory everithing runs smooth.
Now if you unjar the WEB-INF/cocoon/lib/cocoon-core-2.2-SNAPSHOT.jar
into WEB-INF/cocoon/classes (which I suppose should yield the same
behaviour) I got a
Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.servlet.CocoonServletListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
Looking at the BootstrapClassLoaderManager class I cannot see why this
happens. Can someone verify this?
Ciao and TIA
Giacomo
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
iD8DBQFEtf6nLNdJvZjjVZARAukQAKDK903o00MwteeOjS5TI47pRO6FkACghFmJ
/HPnZmqL5J25DzN30ofIWWU=
=ydE9
-----END PGP SIGNATURE-----
Re: Classloading issue in 2.2
Posted by Carsten Ziegeler <cz...@apache.org>.
Giacomo Pati wrote:
> Just to make sure: It works for you in an independant servlet container
> (not in the jetty6:run).
>
> Because the problem I have is that I have a 2.2. project with
> packaging=war with additional java classes which will end up in
> target/classes first (compile phase), WEB-INF/classes next (war plugin)
> and finally in WEB-INF/cocoon/classes (cocoon:deploy plugin) but those
> were not found when deploying target/cocoon-webapp into a different
> servlet engine.
>
Ok, my first test was not correct as I forgot to delete the jar from the
lib directory...(whistle)
But just check out the latest cocoon-bootstrap version and the problem
will be fixed :) - the urls for directories did not contain the
required "/" at the end, the "/" tells the url class loader that this is
a directory and not an archive.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: Classloading issue in 2.2
Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 13 Jul 2006, Carsten Ziegeler wrote:
> Date: Thu, 13 Jul 2006 11:30:02 +0200
> From: Carsten Ziegeler <cz...@apache.org>
> Reply-To: dev@cocoon.apache.org
> To: dev@cocoon.apache.org
> Subject: Re: Classloading issue in 2.2
>
> Giacomo Pati schrieb:
>>
>> After again playing around a bit with 2.2 I have a strange issue with
>> the new shielded classloading stuff.
>>
>> Give you have 'cocoon:deploy' the cocoon-webapp module and copied it
>> into a standalone jetty/tomcat webapps directory everithing runs smooth.
>>
>> Now if you unjar the WEB-INF/cocoon/lib/cocoon-core-2.2-SNAPSHOT.jar
>> into WEB-INF/cocoon/classes (which I suppose should yield the same
>> behaviour) I got a
>>
>> Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.servlet.CocoonServletListener
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
>>
>> Looking at the BootstrapClassLoaderManager class I cannot see why this
>> happens. Can someone verify this?
>>
> No :) It works perfectly for me. Strange.
Just to make sure: It works for you in an independant servlet container
(not in the jetty6:run).
Because the problem I have is that I have a 2.2. project with
packaging=war with additional java classes which will end up in
target/classes first (compile phase), WEB-INF/classes next (war plugin)
and finally in WEB-INF/cocoon/classes (cocoon:deploy plugin) but those
were not found when deploying target/cocoon-webapp into a different
servlet engine.
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
iD8DBQFEthh3LNdJvZjjVZARAgQbAKCIWAlEYpmFScC2QE8Ptogan+7PNgCg8HcI
UVQYB8wuJe8c3tR4tJKpq0Q=
=8K8U
-----END PGP SIGNATURE-----
Re: Classloading issue in 2.2
Posted by Carsten Ziegeler <cz...@apache.org>.
Giacomo Pati schrieb:
>
> After again playing around a bit with 2.2 I have a strange issue with
> the new shielded classloading stuff.
>
> Give you have 'cocoon:deploy' the cocoon-webapp module and copied it
> into a standalone jetty/tomcat webapps directory everithing runs smooth.
>
> Now if you unjar the WEB-INF/cocoon/lib/cocoon-core-2.2-SNAPSHOT.jar
> into WEB-INF/cocoon/classes (which I suppose should yield the same
> behaviour) I got a
>
> Caused by: java.lang.ClassNotFoundException: org.apache.cocoon.servlet.CocoonServletListener
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
>
> Looking at the BootstrapClassLoaderManager class I cannot see why this
> happens. Can someone verify this?
>
No :) It works perfectly for me. Strange.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/