You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Steve Krulewitz <sh...@mm.st> on 2004/07/12 23:22:59 UTC

Problems deploying cocoon app in Jetty

Hi all --

I am having some problems deploying my cocoon based webapp within Jetty. 
  The way I work with cocoon is I build cocoon from the source, then 
copy the main cocoon jar plus needed block jars into my own repository. 
  When I deploy, all of these jars plus the dependent jars are in my 
WEB-INF/libs dir.  This works fine under Tomcat.

When trying to use Jetty, I run in to problems.  I use a basic setup, 
with setting Jetty to look in my webapp dir for the web application. 
First, Jetty won't start my webapp unless i remove the xml-related jars 
(xerces, xalan, xml-apis) from my WEB-INF/lib, as well as 
commons-logging.  Once Jetty is able to start cocoon, I get a 
"org.apache.avalon.framework.component.ComponentException: Could not 
find component" exception that refers to the inability to load a custom 
component that is instantiated by the service() method in one of my 
actions in the main sitemap.  So it seems to be able to find my custom 
action class, but not the component class it uses.

If I run Jetty following the way it is done in the ./cocoon.sh script, 
by explicitly adding all the jars (via the loader) and classes of my 
webapp to the jetty classpath, it loads and runs without a problem. 
However, this does not seem like the "right" way to do it -- or it is 
the only way to get Cocoon to work properly under Jetty?

thanks for any help,
-steve