Hi,

I think the plugin works now. I can deploy the webapp and the web.xml shows additional entries about shielded class loading.

I do mvn cocoon:deploy-war and maven compiles. (I can't do mvn install anymore)

When I load the war file by Tomcat 5.0 and JDK 1.4 I get:

2008-07-07 08:50:53 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2008-07-07 08:51:00 StandardContext[/myCocoonWebapp-1.0]Exception sending context initialized event to listener instance of class org.apache.cocoon.maven.deployer.servlet.ShieldingListener
java.lang.StackOverflowError

2008-07-07 08:51:00 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2008-07-07 08:51:00 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2008-07-07 08:51:00 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2008-07-07 08:51:00 StandardContext[/servlets-examples]SessionListener: contextInitialized()


<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>

  <modelVersion>4.0.0</modelVersion>
  
  <packaging>war</packaging>

  <name>myCocoonWebapp</name>
  
  <groupId>de.memocomp</groupId>
  
  <artifactId>myCocoonWebapp</artifactId>
  
  <version>1.0</version>
  

  <build>
  
    <plugins>
    
    <!-- default plugins -->
      <plugin>
      
        <groupId>org.mortbay.jetty</groupId>
	
        <artifactId>maven-jetty-plugin</artifactId>
	
        <version>6.1.7</version>
	
        <configuration>
	
          <connectors>
	  
            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
	    
              <port>8888</port>
	      
              <maxIdleTime>30000</maxIdleTime>
	      
            </connector>
	    
          </connectors>
	  
          <webAppSourceDirectory>${project.build.directory}/${pom.artifactId}-${pom.version}</webAppSourceDirectory>
	  
          <contextPath>/myCocoonWebapp-1.0-SNAPSHOT</contextPath>
	  
        </configuration>
	
      </plugin>
      
      <!-- custom plugins -->
	<plugin>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-maven-plugin</artifactId>
        <version>1.0.0-M2</version>
	<configuration>
	<project>${project}</project>
	<warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
	<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
	<useShieldingClassLoader>true</useShieldingClassLoader>
        </configuration>

      </plugin>

      
    </plugins>
    
  </build>


  <dependencies>
  
  <!-- custom dependencies -->
    <dependency>
    
        <groupId>de.memocomp</groupId>
	
        <artifactId>myBlock1</artifactId>
	
        <version>1.0</version>
	
      </dependency>
      
  </dependencies>

</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
  - This is the Cocoon web-app configurations file
  -
  - $Id$
  -->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

  <!-- Servlet Filters ================================================ -->

  <!--
    - Declare a filter for multipart MIME handling
    -->
  <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.apache.cocoon.maven.deployer.servlet.ShieldingListener</param-value>
</context-param>



<filter>
  
    <description>Multipart MIME handling filter for Cocoon</description>
    
    <display-name>Cocoon multipart filter</display-name>
    
    <filter-name>CocoonMultipartFilter</filter-name>
    
    <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
    
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.multipart.MultipartFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>


  <!--
    - Declare a filter for debugging incoming request
    -->
  <filter>
  
    <description>Log debug information about each request</description>
    
    <display-name>Cocoon debug filter</display-name>
    
    <filter-name>CocoonDebugFilter</filter-name>
    
    <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
    
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.DebugFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>


  <!-- Filter mappings ================================================ -->

  <!--
    - Use the Cocoon multipart filter together with the Cocoon demo webapp
    -->
  <filter-mapping>
  
    <filter-name>CocoonMultipartFilter</filter-name>
    
    <servlet-name>Cocoon</servlet-name>
    
  </filter-mapping>
  
  <filter-mapping>
  
    <filter-name>CocoonMultipartFilter</filter-name>
    
    <servlet-name>DispatcherServlet</servlet-name>
    
  </filter-mapping>


  <!--
    - Use the Cocoon debug filter together with the Cocoon demo webapp
  <filter-mapping>
    <filter-name>CocoonDebugFilter</filter-name>
    <servlet-name>Cocoon</servlet-name>
  </filter-mapping>
    -->

  <!-- Servlet Context Listener ======================================= -->

  <!--
    - Declare Spring context listener which sets up the Spring Application Context
    - containing all Cocoon components (and user defined beans as well).
    -->
  <listener>
  
    <listener-class>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</listener-class>
    
  </listener>

  <!--
    - Declare Spring request listener which sets up the required RequestAttributes
    - to support Springs and Cocoon custom bean scopes like the request scope or the
    - session scope.
    -->
  

  <!-- Servlet Configuration ========================================== -->

  <!--
    - Servlet that dispatches requests to the Spring managed block servlets
    -->
  <servlet>
  
    <description>Cocoon blocks dispatcher</description>
    
    <display-name>DispatcherServlet</display-name>
    
    <servlet-name>DispatcherServlet</servlet-name>
    
    <servlet-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</servlet-class>
    
    <init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.servletservice.DispatcherServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
    
  </servlet>

  <!-- URL space mappings ============================================= -->

  <!--
    - Cocoon handles all the URL space assigned to the webapp using its sitemap.
    - It is recommended to leave it unchanged. Under some circumstances though
    - (like integration with proprietary webapps or servlets) you might have
    - to change this parameter.
    -->
  <servlet-mapping>
  
    <servlet-name>DispatcherServlet</servlet-name>
    
    <url-pattern>/*</url-pattern>
    
  </servlet-mapping>


  <security-constraint>
  
    <display-name>mcDBAdmin Security</display-name>
    
    <web-resource-collection>
    
      <web-resource-name>Protected Area</web-resource-name>
      
      <!-- Define the context-relative URL(s) to be protected -->
      <url-pattern>/*</url-pattern>
  
      <!-- If you list http methods, only those methods are protected -->
      <http-method>DELETE</http-method>
      
      <http-method>GET</http-method>
      
      <http-method>POST</http-method>
      
      <http-method>PUT</http-method>
      
    </web-resource-collection>
    
    <auth-constraint>
    
      <!-- Anyone with one of the listed roles may access this area -->
      <role-name>user</role-name>
      
      <role-name>admin</role-name>
      
    </auth-constraint>
  
    <!--
      <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
    -->
  </security-constraint>
<!--
  <login-config>
  
    <auth-method>BASIC</auth-method>
    
    <realm-name>BASIC Authentication mcDBWebEditor</realm-name>
    
  </login-config>
   --> 
  <!-- Default login configuration uses form-based authentication -->
  
    <login-config>
    
      <auth-method>FORM</auth-method>
      
      <realm-name>Example Form-Based Authentication Area</realm-name>
      
      <form-login-config>
      
        <form-login-page>/myBlock1/login</form-login-page>
	
        <form-error-page>/myBlock1/login</form-error-page>
	
      </form-login-config>
      
    </login-config>

    <!--filter and filter mapping were added because Tomcat has not allowed
	to access the login pattern before logged in-->
    <filter>
    
      <filter-name>springRequestContextFilter</filter-name>   
      
      <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
      
    <init-param>
<param-name>filter-class</param-name>
<param-value>org.springframework.web.filter.RequestContextFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>

    <filter-mapping>
    
      <filter-name>springRequestContextFilter</filter-name>
      
      <url-pattern>/*</url-pattern>
      
      <dispatcher>FORWARD</dispatcher>
      
      <dispatcher>REQUEST</dispatcher>
      
    </filter-mapping>
  
  <!-- Security roles referenced by this web application -->
  <security-role>
  
    <role-name>admin</role-name>
    
  </security-role>
  
  <security-role>
  
    <role-name>user</role-name>
    
  </security-role>
  
  <security-role>
  
    <role-name>guest</role-name>
    
  </security-role>

</web-app>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to