You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Peter Lerche <pe...@easyspeedy.com> on 2004/05/19 14:43:49 UTC

generator jars in other location than /lib /classes

Hi,

I am going bonkers.


After 2 weeks I have still not cracked how to change cocoon 2.1.5 to accept 
other locations for its sitemap elements than the /lib and /classes dir.

The file exist-optional.jar contains a 3part sitemap generator. I am forced to 
have this file located in a different location than what is expected by 
cocoon.  (see below).

How do I get cocoon to accept this file location.

I have tried to change sourcecode,classloaders,cocoon.roles,metainf.mf... but 
with no luck.

Please who can tell me how to do this..


dir struct...
./deploy
        cocoon.war
                WEB-INF
                        lib
                               
        exist.sar
                lib
                       exist-optional.jar
			...
                        WEB-INF
        ...


Med venlig hilsen / Yours sincerely 
 
Peter Lerche
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

Re: generator jars in other location than /lib /classes

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Bertrand Delacretaz wrote:

> Le 19 mai 04, à 14:43, Peter Lerche a écrit :
>
>> ...After 2 weeks I have still not cracked how to change cocoon 2.1.5 
>> to accept
>> other locations for its sitemap elements than the /lib and /classes 
>> dir....
>

See ParanoidCocoonServlet in paranoid block, should be possible to add 
any jars to the classpath.


> hmmm...I'm no expert on servlet containers, but isn't that a 
> limitation (or rather a security feature) of the servlet container, 
> that will not let you access jars in other applications?


No, it is by design: web application classloader loads /lib and 
/classes. Cocoon's paranoid class loader can be used to add to this 
default class path arbitrary jars. AFAIU.

Vadim


Re: generator jars in other location than /lib /classes

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Peter Lerche wrote:

>Hi,
>
>I'm no expert either, but no there is no constraints.
>
>This is a JBoss setup and I am able to access any jar at any location using 
>Jboss's urlclassloader or JBOSS_CLASSPATH. (I assume that this would also be 
>the case in a non-jboss installation using CLASSPATH)
>Cocoon (Avalon ?) does not recognize any CLASSPATH or classloaders when the 
>class is declared in the sitemap.xmap file. It looks like that Cocoon has 
>hardcoded the /lib /classes directory in the sourcecode. However there is 
>reference to these two directories in a zillion locations.
>  
>

Once again (see prev email), to clear up confusion, default Cocoon 
servlet does not build any classloader of its own, but uses one from the 
container. And any well behaved container classloader will respect 
specification and add /classes and /lib to its classpath.

Vadim


>Peter
>http://easyspeedy.com
>
> 
>On Wednesday 19 May 2004 15:31, Bertrand Delacretaz wrote:
>  
>
>>Le 19 mai 04, à 14:43, Peter Lerche a écrit :
>>    
>>
>>>...After 2 weeks I have still not cracked how to change cocoon 2.1.5
>>>to accept
>>>other locations for its sitemap elements than the /lib and /classes
>>>dir....
>>>      
>>>
>> <>hmmm...I'm no expert on servlet containers, but isn't that a limitation
>> (or rather a security feature) of the servlet container, that will not
>> let you access jars in other applications?
>>
>> -Bertrand
>


Re: generator jars in other location than /lib /classes

Posted by Peter Lerche <pe...@easyspeedy.com>.
Hi,

I'm no expert either, but no there is no constraints.

This is a JBoss setup and I am able to access any jar at any location using 
Jboss's urlclassloader or JBOSS_CLASSPATH. (I assume that this would also be 
the case in a non-jboss installation using CLASSPATH)
Cocoon (Avalon ?) does not recognize any CLASSPATH or classloaders when the 
class is declared in the sitemap.xmap file. It looks like that Cocoon has 
hardcoded the /lib /classes directory in the sourcecode. However there is 
reference to these two directories in a zillion locations.

Peter
http://easyspeedy.com

 
On Wednesday 19 May 2004 15:31, Bertrand Delacretaz wrote:
> Le 19 mai 04, à 14:43, Peter Lerche a écrit :
> > ...After 2 weeks I have still not cracked how to change cocoon 2.1.5
> > to accept
> > other locations for its sitemap elements than the /lib and /classes
> > dir....
>
> hmmm...I'm no expert on servlet containers, but isn't that a limitation
> (or rather a security feature) of the servlet container, that will not
> let you access jars in other applications?
>
> -Bertrand

-- 
Med venlig hilsen / Yours sincerely 
 
Peter Lerche
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

Re: generator jars in other location than /lib /classes

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 19 mai 04, à 14:43, Peter Lerche a écrit :

> ...After 2 weeks I have still not cracked how to change cocoon 2.1.5 
> to accept
> other locations for its sitemap elements than the /lib and /classes 
> dir....

hmmm...I'm no expert on servlet containers, but isn't that a limitation 
(or rather a security feature) of the servlet container, that will not 
let you access jars in other applications?

-Bertrand