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






Reply via email to