You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew Le Quesne <an...@nexusalpha.com> on 2005/07/05 13:06:18 UTC
Problem starting cocoon webapp in Jetty
Hi,
I have just created a new cocoon web app (2.1.6). When I try to run it in
Jetty I get the error message displayed below. Can anybody explain what is
going wrong and suggest a possible fix. I am running java 1.4.1_03 and Jetty
version 4.2.9. Could it possibly be caused by a defective jar file??
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mortbay.start.Main.invokeMain(Main.java:153)
at org.mortbay.start.Main.start(Main.java:483)
at org.mortbay.start.Main.main(Main.java:91)
Caused by: java.lang.NoSuchMethodError:
org.apache.xml.resolver.tools.CatalogRes
olver.<init>(Lorg/apache/xml/resolver/CatalogManager;)V
at
org.apache.excalibur.xml.DefaultEntityResolver.<init>(DefaultEntityRe
solver.java:62)
at
org.apache.cocoon.components.resolver.DefaultResolver.<init>(DefaultR
esolver.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:179)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.looku
p(ExcaliburComponentManager.java:276)
at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComp
onentManager.java:310)
at
org.apache.avalon.framework.service.WrapperServiceManager.lookup(Wrap
perServiceManager.java:107)
at
org.apache.excalibur.xml.impl.JaxpParser.service(JaxpParser.java:142)
at
org.apache.avalon.framework.container.ContainerUtil.service(Container
Util.java:182)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:255)
at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(Res
ourceLimitingPool.java:672)
at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLim
itingPool.java:402)
at
org.apache.avalon.excalibur.component.PoolableComponentHandler.doGet(
PoolableComponentHandler.java:198)
at
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentH
andler.java:381)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.looku
p(ExcaliburComponentManager.java:277)
at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComp
onentManager.java:310)
at
org.apache.avalon.framework.service.WrapperServiceManager.lookup(Wrap
perServiceManager.java:107)
at
org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java
:119)
at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:
166)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.configure(Tr
eeProcessor.java:203)
at
org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:240)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:269)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initi
alize(ExcaliburComponentManager.java:522)
at
org.apache.cocoon.components.CocoonComponentManager.initialize(Cocoon
ComponentManager.java:541)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:283)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:280)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:283)
at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.ja
va:1382)
at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:480)
at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:220)
at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHa
ndler.java:445)
at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(We
bApplicationHandler.java:150)
at
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationC
ontext.java:458)
at org.mortbay.http.HttpServer.start(HttpServer.java:663)
at org.mortbay.jetty.Server.main(Server.java:429)
... 7 more
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem starting cocoon webapp in Jetty
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Andrew Le Quesne wrote:
> thanks for your replies. Should you put endorsed folder for the xalan and
> xerces jars go in Jetty or the cocoon web app and what would be the specific
> path? Also, when I tried using
> org.apache.cocoon.servlet.ParanoidCocoonServlet it kept saying it couldn't
> find it.
anywhere you like. just remember to start your jetty instance with
additional parameter java.endorsed.libs set.
this is my ant target for running and debugging jetty:
> <target name="jetty:run" depends="jetty:init" description="run webapp on built-in jetty">
> <java classname="org.mortbay.jetty.Server" classpathref="jetty.cp" fork="true" dir="${build}">
> <jvmarg value="-Djava.endorsed.dirs=${lib.endorsed}"/>
> <jvmarg value="-Djetty.home=."/>
> <jvmarg value="-Dwebapp=webapp"/>
> <jvmarg value="-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser"/>
> <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.defaultlog=warn"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.log.org.mortbay=info"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.showlogname=false"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.showShortLogname=false"/>
> <arg value="etc/main.xml"/>
> <arg value="etc/admin.xml"/>
> </java>
> </target>
>
> <target name="jetty:debug" depends="jetty:init" description="run webapp on built-in jetty with DEBUG mode enabled">
> <java classname="org.mortbay.jetty.Server" classpathref="jetty.cp" fork="true" dir="${build}">
> <jvmarg value="-Xdebug"/>
> <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
> <jvmarg value="-Djava.endorsed.dirs=${lib.endorsed}"/>
> <jvmarg value="-Djetty.home=."/>
> <jvmarg value="-Dwebapp=webapp"/>
> <jvmarg value="-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser"/>
> <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.defaultlog=warn"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.log.org.mortbay=info"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.showlogname=false"/>
> <jvmarg value="-Dorg.apache.commons.logging.simplelog.showShortLogname=false"/>
> <arg value="etc/main.xml"/>
> <arg value="etc/admin.xml"/>
> </java>
> </target>
cheers
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Problem starting cocoon webapp in Jetty
Posted by Andrew Le Quesne <an...@nexusalpha.com>.
thanks for your replies. Should you put endorsed folder for the xalan and
xerces jars go in Jetty or the cocoon web app and what would be the specific
path? Also, when I tried using
org.apache.cocoon.servlet.ParanoidCocoonServlet it kept saying it couldn't
find it.
-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of Jorg Heymans
Sent: 05 July 2005 13:02
To: users@cocoon.apache.org
Subject: Re: Problem starting cocoon webapp in Jetty
Leszek Gawron wrote:
>>
>> Jetty
>> version 4.2.9. Could it possibly be caused by a defective jar file??
>>
>
>
> Those problems usually smell like wrong handling of endorsed libs.
>
> http://wiki.apache.org/cocoon/EndorsedLibsProblem
Yes and based on this, i would say that you're not running the 4.2.x
series of jetty but a 5.x one.
I've used cocoon with almost all 4.2 releases and never had to deal with
endorsed libs. The 5.x series needs special care just like tomcat.
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem starting cocoon webapp in Jetty
Posted by Jorg Heymans <jh...@domek.be>.
Leszek Gawron wrote:
>>
>> Jetty
>> version 4.2.9. Could it possibly be caused by a defective jar file??
>>
>
>
> Those problems usually smell like wrong handling of endorsed libs.
>
> http://wiki.apache.org/cocoon/EndorsedLibsProblem
Yes and based on this, i would say that you're not running the 4.2.x
series of jetty but a 5.x one.
I've used cocoon with almost all 4.2 releases and never had to deal with
endorsed libs. The 5.x series needs special care just like tomcat.
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem starting cocoon webapp in Jetty
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Andrew Le Quesne wrote:
> Hi,
>
> I have just created a new cocoon web app (2.1.6). When I try to run it in
> Jetty I get the error message displayed below. Can anybody explain what is
> going wrong and suggest a possible fix. I am running java 1.4.1_03 and Jetty
> version 4.2.9. Could it possibly be caused by a defective jar file??
>
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.mortbay.start.Main.invokeMain(Main.java:153)
> at org.mortbay.start.Main.start(Main.java:483)
> at org.mortbay.start.Main.main(Main.java:91)
> Caused by: java.lang.NoSuchMethodError:
> org.apache.xml.resolver.tools.CatalogRes
> olver.<init>(Lorg/apache/xml/resolver/CatalogManager;)V
> at
> org.apache.excalibur.xml.DefaultEntityResolver.<init>(DefaultEntityRe
> solver.java:62)
Those problems usually smell like wrong handling of endorsed libs.
http://wiki.apache.org/cocoon/EndorsedLibsProblem
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org