cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: rcl & including jars for jetty
Date Sun, 17 Feb 2008 19:08:56 GMT
anil wrote:
> Hi -
> 
> I'm trying to integrate a 3rd party servlet filter into a cocoon block I'm
> creating. I'm using rcl & trying to patch the web.xml generated by the rcl
> plugin using the xpatch mechanism.
> 
> The patching of the web.xml seems to be fine - I can see the web.xml built
> and my changes are visible - but when I bring up run the jetty:run goal on
> the block jetty cannot find jar file for the servlet filter that I have
> integrated.
> 
> What I have done is this:
> 
> 1) Added the servlet filter dependency to the pom.xml for my block
> 
> 2) created some *.xweb files within the cocoon/xpatch directory
> 
> When I run mvn jetty:run I get the following error:
> 
> javax.servlet.ServletException: Cannot load filter
> org.chiba.web.filter.XFormsFilter
> 	at
> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.init(ReloadingServletFilter.java:74)
> 	
> [<snip>]
> 
> Caused by: java.lang.ClassNotFoundException:
> org.chiba.web.filter.XFormsFilter
> 
> 
> 
> So effectively jetty can't find the jar file that it needs to start up the
> filter. I would have thought that adding the jar as a dependency within my
> pom.xml would be all I need to do.
> 
> Can anyone clarify how I should approach this? Am I doing the right thing?

yes, sounds correct to me.

> I tried to find some documentation on the rcl plugin in case there was some
> configuration, but the link to the configuration javadocs seems to be broken
> - the location is:
> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1297_1_1.html.
> 
> Could someone also explain the significance of the rclwrapper.urlcl.conf
> file - this seems to contain a list of directory locations to jars within my
> block, but the list is not exhaustive, and interestingly the jar files that
> contain the servlet filter I'm trying to integrate are not listed. 

rclwrapper.urlcl.conf is used to build the web application classloader. It has 
to contain all libraries that are needed to run your project. It is created by 
reading the classpath that is calculated by Maven which means that adding your 
project as dependency should be all that you have to do.

In order to verify if everything is correct, use 'mvn dependency:resolve' and 
check if the dependency (chiba) is listed.
Finally, one further idea: After adding a dependency to your pom.xml file, you 
have to run 'mvn cocoon:rcl' again.

-- 
Reinhard Pötz                            Managing Director, {Indoqa} GmbH
                           http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair        reinhard@apache.org
_________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message