You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Olivier Billard <ol...@laposte.net> on 2007/08/22 13:55:13 UTC

Why has the PanaoidCocoonServlet disappear ?

Hi Cocooners,

What is the reason why the useful paranoid class-loading mechanism has disappear from Cocoon 2.1 and Cocoon 2.2 ?
Is it an 2.1->2.2 translation remaining ? Is is standard now, and in this case is there somewhere I could find some information about it ?

Thank you very much !

--
Olivier Billard


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Reinhard Poetz wrote:
> Olivier Billard wrote:
>> Hi all,
>>
>> Still annoyed with that problem.
>> Can anyone confirm or not ? Should I feed JIRA ?
> 
> Yes, please do so. I'm sorry, but I  can't help with the problem till 
> the end of September when I'm back from my vacations.


No problem Reinhard, you already help me a lot on other subjects.
I must finish hot-boiling stuff for now but I'll try to write a clean (easy to reproduce with Cocoon sources) bug report for it ASAP.

Good luck all for RC2 release :)
--
Olivier Billard


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Reinhard Poetz <re...@apache.org>.
Olivier Billard wrote:
> Hi all,
> 
> Still annoyed with that problem.
> Can anyone confirm or not ? Should I feed JIRA ?

Yes, please do so. I'm sorry, but I  can't help with the problem till the end of 
September when I'm back from my vacations.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Hi all,

Still annoyed with that problem.
Can anyone confirm or not ? Should I feed JIRA ?

Thanks !
--
Olivier Billard

Olivier Billard wrote:
> Hi all,
> 
> Getting further after my... hum... it seems now that the shielding 
> classloader does not do its job, I now have the good old endorsed libs 
> problem with Tomcat 5.0.30 (Java 6). Removing endorsed libs shipped with 
> the Tomcat distrib, it works.
> 
> Error : java.lang.NoSuchMethodError: 
> javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
> 
> web.xml snippet:
> <snip/>
> <context-param>
>   <param-name>shieled-classloader-use-repository</param-name>
>   <param-value>false</param-value>
> </context-param>
> 
> <context-param>
>   
> <param-name>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</param-name> 
> 
>   
> <param-value>org.springframework.web.context.ContextLoaderListener,org.springframework.web.context.request.RequestContextListener</param-value> 
> 
> </context-param>
> <filter>
>   <description>Acegi Security Filter</description>
>   <display-name>Acegi Security Filter</display-name>
>   <filter-name>Acegi Security Filter</filter-name>
>   
> <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class> 
> 
>   <init-param>
>     <param-name>targetClass</param-name>
>     <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
>   </init-param>
>   <init-param>
>     <param-name>filter-class</param-name>
>     <param-value>org.acegisecurity.util.FilterToBeanProxy</param-value>
>   </init-param>
> </filter>
> 
> <snip/>
> 
> <listener>
>   
> <listener-class>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</listener-class> 
> 
> </listener>
> 
> 
> Thanks
> -- 
> Olivier Billard
> 
> 
> Olivier Billard wrote:
>> Oh sorry,
>>
>> I may have misused the maven command line. I retested with a shorter, 
>> cleaner command and it now produces a cleaner web.xml.
>>
>>
>> -- 
>> Olivier Billard
>>
>>
>>
>> Olivier Billard wrote:
>>> Hi Reinhard,
>>>
>>> Thanks for your reply.
>>> Info below.
>>>
>>>
>>> Reinhard Poetz wrote:
>>>> Olivier Billard wrote:
>>>>> Hi Jean-Baptiste !
>>>>>
>>>>> Thank you for your quick reply.
>>>>>
>>>>> Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not 
>>>>> clear in my post, but I am talking about Cocoon 2.2 :).
>>>>> Searching a bit, I found some information about the shielding 
>>>>> servlet service, that seems to do that job, replacing the 
>>>>> ParanoidCocoonServlet. Is it ?
>>>>
>>>> yes, right. See 
>>>> http://cocoon.zones.apache.org/dev-docs/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html. 
>>>
>>>
>>>
>>>
>>> <parentheses>Nice skin :)</parentheses>
>>>
>>>
>>>> The Cocoon deploy plugin offers a "deploy" goal which can be 
>>>> configured to use the shielding classloader. The goal rewrites the 
>>>> web.xml to bypass all servlet, filter and listener calls and uses a 
>>>> shielding classloader which reverses the classloader hierarchy the 
>>>> same way as the ParanoidCocoonServlet did for 2.1. It also adds the 
>>>> necessary classes to your webapp. In short, the shielding stuff is 
>>>> only a configuration option.
>>>>
>>>> The note, that the plugin hasn't been released yet isn't valid 
>>>> anymore. It is available at version 1.0.0-M1.
>>>>
>>>> If you try it out, please let me know if it works for you as 
>>>> expected. (I've only tested it in a very simple scenario so far ...)
>>>
>>>
>>> I tried, but the resulting patched web.xml is missing the 2 following 
>>> Cocoon listener declarations:
>>> - org.springframework.web.context.ContextLoaderListener
>>> - org.springframework.web.context.request.RequestContextListener
>>>
>>> Those declaration seem to have been replaced by the ShieldingListener 
>>> declaration, maybe instead of simply just add the ShieldingListener 
>>> declaration?
>>>
>>>
>>> This causes a Tomcat error, that looks like an endless loop.
>>> Adding the "missing" declarations in the web.xml file makes Tomcat 
>>> start fine.
>>>
>>> Is it a bug ?
>>>
>>> -- 
>>> Olivier Billard
>>>
>>>
>>>
>>
>>
> 
> 


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Hi all,

Getting further after my... hum... it seems now that the shielding classloader does not do its job, I now have the good old endorsed libs problem with 
Tomcat 5.0.30 (Java 6). Removing endorsed libs shipped with the Tomcat distrib, it works.

Error : java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;

web.xml snippet:
<snip/>
<context-param>
   <param-name>shieled-classloader-use-repository</param-name>
   <param-value>false</param-value>
</context-param>

<context-param>
   <param-name>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</param-name>
   <param-value>org.springframework.web.context.ContextLoaderListener,org.springframework.web.context.request.RequestContextListener</param-value>
</context-param>
<filter>
   <description>Acegi Security Filter</description>
   <display-name>Acegi Security Filter</display-name>
   <filter-name>Acegi Security Filter</filter-name>
   <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
   <init-param>
     <param-name>targetClass</param-name>
     <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
   </init-param>
   <init-param>
     <param-name>filter-class</param-name>
     <param-value>org.acegisecurity.util.FilterToBeanProxy</param-value>
   </init-param>
</filter>

<snip/>

<listener>
   <listener-class>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</listener-class>
</listener>


Thanks
--
Olivier Billard


Olivier Billard wrote:
> Oh sorry,
> 
> I may have misused the maven command line. I retested with a shorter, 
> cleaner command and it now produces a cleaner web.xml.
> 
> 
> -- 
> Olivier Billard
> 
> 
> 
> Olivier Billard wrote:
>> Hi Reinhard,
>>
>> Thanks for your reply.
>> Info below.
>>
>>
>> Reinhard Poetz wrote:
>>> Olivier Billard wrote:
>>>> Hi Jean-Baptiste !
>>>>
>>>> Thank you for your quick reply.
>>>>
>>>> Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not 
>>>> clear in my post, but I am talking about Cocoon 2.2 :).
>>>> Searching a bit, I found some information about the shielding 
>>>> servlet service, that seems to do that job, replacing the 
>>>> ParanoidCocoonServlet. Is it ?
>>>
>>> yes, right. See 
>>> http://cocoon.zones.apache.org/dev-docs/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html. 
>>
>>
>>
>> <parentheses>Nice skin :)</parentheses>
>>
>>
>>> The Cocoon deploy plugin offers a "deploy" goal which can be 
>>> configured to use the shielding classloader. The goal rewrites the 
>>> web.xml to bypass all servlet, filter and listener calls and uses a 
>>> shielding classloader which reverses the classloader hierarchy the 
>>> same way as the ParanoidCocoonServlet did for 2.1. It also adds the 
>>> necessary classes to your webapp. In short, the shielding stuff is 
>>> only a configuration option.
>>>
>>> The note, that the plugin hasn't been released yet isn't valid 
>>> anymore. It is available at version 1.0.0-M1.
>>>
>>> If you try it out, please let me know if it works for you as 
>>> expected. (I've only tested it in a very simple scenario so far ...)
>>
>>
>> I tried, but the resulting patched web.xml is missing the 2 following 
>> Cocoon listener declarations:
>> - org.springframework.web.context.ContextLoaderListener
>> - org.springframework.web.context.request.RequestContextListener
>>
>> Those declaration seem to have been replaced by the ShieldingListener 
>> declaration, maybe instead of simply just add the ShieldingListener 
>> declaration?
>>
>>
>> This causes a Tomcat error, that looks like an endless loop.
>> Adding the "missing" declarations in the web.xml file makes Tomcat 
>> start fine.
>>
>> Is it a bug ?
>>
>> -- 
>> Olivier Billard
>>
>>
>>
> 
> 


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Oh sorry,

I may have misused the maven command line. I retested with a shorter, cleaner command and it now produces a cleaner web.xml.


--
Olivier Billard



Olivier Billard wrote:
> Hi Reinhard,
> 
> Thanks for your reply.
> Info below.
> 
> 
> Reinhard Poetz wrote:
>> Olivier Billard wrote:
>>> Hi Jean-Baptiste !
>>>
>>> Thank you for your quick reply.
>>>
>>> Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not 
>>> clear in my post, but I am talking about Cocoon 2.2 :).
>>> Searching a bit, I found some information about the shielding servlet 
>>> service, that seems to do that job, replacing the 
>>> ParanoidCocoonServlet. Is it ?
>>
>> yes, right. See 
>> http://cocoon.zones.apache.org/dev-docs/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html. 
> 
> 
> <parentheses>Nice skin :)</parentheses>
> 
> 
>> The Cocoon deploy plugin offers a "deploy" goal which can be 
>> configured to use the shielding classloader. The goal rewrites the 
>> web.xml to bypass all servlet, filter and listener calls and uses a 
>> shielding classloader which reverses the classloader hierarchy the 
>> same way as the ParanoidCocoonServlet did for 2.1. It also adds the 
>> necessary classes to your webapp. In short, the shielding stuff is 
>> only a configuration option.
>>
>> The note, that the plugin hasn't been released yet isn't valid 
>> anymore. It is available at version 1.0.0-M1.
>>
>> If you try it out, please let me know if it works for you as expected. 
>> (I've only tested it in a very simple scenario so far ...)
> 
> 
> I tried, but the resulting patched web.xml is missing the 2 following 
> Cocoon listener declarations:
> - org.springframework.web.context.ContextLoaderListener
> - org.springframework.web.context.request.RequestContextListener
> 
> Those declaration seem to have been replaced by the ShieldingListener 
> declaration, maybe instead of simply just add the ShieldingListener 
> declaration?
> 
> 
> This causes a Tomcat error, that looks like an endless loop.
> Adding the "missing" declarations in the web.xml file makes Tomcat start 
> fine.
> 
> Is it a bug ?
> 
> -- 
> Olivier Billard
> 
> 
> 


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Hi Reinhard,

Thanks for your reply.
Info below.


Reinhard Poetz wrote:
> Olivier Billard wrote:
>> Hi Jean-Baptiste !
>>
>> Thank you for your quick reply.
>>
>> Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not 
>> clear in my post, but I am talking about Cocoon 2.2 :).
>> Searching a bit, I found some information about the shielding servlet 
>> service, that seems to do that job, replacing the 
>> ParanoidCocoonServlet. Is it ?
> 
> yes, right. See 
> http://cocoon.zones.apache.org/dev-docs/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html. 

<parentheses>Nice skin :)</parentheses>


> The Cocoon deploy plugin offers a "deploy" goal which can be configured 
> to use the shielding classloader. The goal rewrites the web.xml to 
> bypass all servlet, filter and listener calls and uses a shielding 
> classloader which reverses the classloader hierarchy the same way as the 
> ParanoidCocoonServlet did for 2.1. It also adds the necessary classes to 
> your webapp. In short, the shielding stuff is only a configuration option.
> 
> The note, that the plugin hasn't been released yet isn't valid anymore. 
> It is available at version 1.0.0-M1.
> 
> If you try it out, please let me know if it works for you as expected. 
> (I've only tested it in a very simple scenario so far ...)


I tried, but the resulting patched web.xml is missing the 2 following Cocoon listener declarations:
- org.springframework.web.context.ContextLoaderListener
- org.springframework.web.context.request.RequestContextListener

Those declaration seem to have been replaced by the ShieldingListener declaration, maybe instead of simply just add the ShieldingListener declaration?


This causes a Tomcat error, that looks like an endless loop.
Adding the "missing" declarations in the web.xml file makes Tomcat start fine.

Is it a bug ?

--
Olivier Billard



Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Reinhard Poetz <re...@apache.org>.
Olivier Billard wrote:
> Hi Jean-Baptiste !
> 
> Thank you for your quick reply.
> 
> Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not clear 
> in my post, but I am talking about Cocoon 2.2 :).
> Searching a bit, I found some information about the shielding servlet 
> service, that seems to do that job, replacing the ParanoidCocoonServlet. 
> Is it ?

yes, right. See 
http://cocoon.zones.apache.org/dev-docs/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html.

The Cocoon deploy plugin offers a "deploy" goal which can be configured to use 
the shielding classloader. The goal rewrites the web.xml to bypass all servlet, 
filter and listener calls and uses a shielding classloader which reverses the 
classloader hierarchy the same way as the ParanoidCocoonServlet did for 2.1. It 
also adds the necessary classes to your webapp. In short, the shielding stuff is 
only a configuration option.

The note, that the plugin hasn't been released yet isn't valid anymore. It is 
available at version 1.0.0-M1.

If you try it out, please let me know if it works for you as expected. (I've 
only tested it in a very simple scenario so far ...)

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Olivier Billard <ol...@laposte.net>.
Hi Jean-Baptiste !

Thank you for your quick reply.

Didn't you mention the 2.1 part of the SVN repo ? Maybe was it not clear in my post, but I am talking about Cocoon 2.2 :).
Searching a bit, I found some information about the shielding servlet service, that seems to do that job, replacing the ParanoidCocoonServlet. Is it ?

We experiment some trouble though, with Tomcat 5.0.30, could it be that the default deployer configuration does not use the shielding servlet, if it 
is the right way to go ?

Thanks !

--
Olivier


Jean-Baptiste Quenot wrote:
> * Olivier Billard:
> 
>> What  is  the  reason  why  the  useful  paranoid  class-loading
>> mechanism has disappear  from Cocoon 2.1 and Cocoon 2.2  ? Is it
>> an 2.1->2.2 translation  remaining ? Is is standard  now, and in
>> this case is there somewhere I could find some information about
>> it ?
> 
> For sure it's still there:
> 
> http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/blocks/paranoid/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java


Re: Why has the PanaoidCocoonServlet disappear ?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Olivier Billard:

> What  is  the  reason  why  the  useful  paranoid  class-loading
> mechanism has disappear  from Cocoon 2.1 and Cocoon 2.2  ? Is it
> an 2.1->2.2 translation  remaining ? Is is standard  now, and in
> this case is there somewhere I could find some information about
> it ?

For sure it's still there:

http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/blocks/paranoid/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/