Luca Morandini wrote:
Daniel Fagerstrom wrote:
Luca Morandini skrev:
Patrick Refondini wrote:
shouldn't it be :
-Dmaven.war.shieldingclassloader=false
Thanks for this bit of information, but Cocoon doesn't run yet.
I did:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
clean install
cd core/cocoon-webapp
mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
Hi Luca, following Reinhard Poetz advice:
"Luca (and others), delete your org/apache/cocoon directory from your
local repo and build cocoon again. Maybe this helps ... "
and after:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
-Dallblocks clean install
cd core/cocoon-webapp
mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
works fine:
~/dev/c22/cocoon_trunk/core/cocoon-webapp patrick$ mvn
jetty:run-exploded -Dorg.apache.cocoon.mode=dev
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Core Webapp
[INFO] task-segment: [jetty:run-exploded]
[INFO]
----------------------------------------------------------------------------
<snip />
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-30 19:09:10.977::INFO: jetty-6.0.0rc4
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-30 19:09:11.413:/:INFO: Loading Spring root WebApplicationContext
2006-11-30 19:09:13.680:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
Cannot find CatalogManager.properties
2006-11-30 19:09:16.993:/:INFO: DispatcherServlet: Block dispatcher was
initialized successfully.
2006-11-30 19:09:17.021::INFO: Started SelectChannelConnector @
0.0.0.0:8888
[INFO] Started Jetty Server
On Linux/MacOSX default maven repository is at:
~/.m2/repository/org/apache/cocoon
don't know on Windows.
A last thing which may lead to significant difference is Maven
settings.xml file config. For me this seems to play well:
In the servers section / Element:
<servers>
<!-- DEFINED according to Cocoon 2.2 settings.xml sample ... -->
<server>
<id>apache-maven-snapshot</id>
<username>jheymans</username>
</server>
</servers>
In the mirrors section / Element:
<mirrors>
<!-- DEFINED FOR COCOON 2.2
<mirror>
<mirrorOf>central</mirrorOf>
<id>ibiblioEuropeanMirror</id>
<url>http://mirrors.dotsrc.org/maven2</url>
</mirror>
-->
<!-- For Cocoon 2.2 -->
<!-- Denmark -->
<mirror>
<id>mirrors.dotsrc.org</id>
<url>http://mirrors.dotsrc.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- Denmark -->
<mirror>
<id>repo1.maven.org</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- United States, somewhere
<mirror>
<id>repo.mergere.com</id>
<url>http://repo.mergere.com/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!-- United States, Louisiana
<mirror>
<id>lsu.edu</id>
<url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!-- United States, North Carolina
<mirror>
<id>ibiblio.net</id>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!--
<mirror>
<id>planetmirror.com</id>
<url>http://downloads.planetmirror.com/pub/maven2</url>
<mirrorOf>central</mirrorOf>
Australia, Queensland
</mirror>
-->
<!--
<mirror>
<mirrorOf>central</mirrorOf>
<id>ibiblioAustralianMirror</id>
<url>http://public.planetmirror.com/pub/maven2</url>
</mirror>
-->
</mirrors>
I let commented out mirrors for you to play with in case the only one I
have let do not work as expected... I do not have a strong understanding
of priorities given to defined mirrors so take my advice with care...
Hope this may help you,
Patrick
I have had problems lately with that an avalon-framework-4.0.jar (from
2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
Avalon framework 4.3 jars that Cocoon depends on and give a stack
trace similar to yours. Remove the faulty jar and try to run Cocoon
again.
I don't think this is the issue, since I see only two Avalon JARs, both
4.3 (avalon-framework-api-4.3.jar, avalon-framework-impl-4.3.jar).
Some other points: jetty:run-exploded seem to do some unnecessary
extra work compared to jetty:run. Use the -e switch for jetty:run so
that you get the whole stack trace. Otherwise it is very hard to see
what is the problem.
Here you are, Sir:
[INFO] [jetty:run]
[INFO] Configuring Jetty for project: Core Webapp
[INFO] Webapp source directory =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
[INFO] web.xml file =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp\WEB-INF\web.xml
[INFO] Classes directory
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\classes does not exist
2006-11-27 17:04:33.307::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
[INFO] Context path = /
[INFO] Tmp directory =
c:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\work
[INFO] Web defaults = jetty default
[INFO] Webapp directory =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-27 17:04:35.150::INFO: jetty-6.0.0rc4
[INFO] Classpath =
[file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/classes/,
file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/classes,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-core/2.0/spring-core-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-bcel/jakarta-bcel/20040329/jakarta-bcel-20040329.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/logger/excalibur-logger/2.1/excalibur-logger-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-aop/2.0/spring-aop-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-core/2.2.0-M2-SNAPSHOT/cocoon-core-2.2.0-M2-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/junit/junit/3.8/junit-3.8.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-api/4.3/avalon-framework-api-4.3.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/sourceresolve/excalibur-sourceresolve/2.1/excalibur-sourceresolve-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/xmlutil/excalibur-xmlutil/2.1/excalibur-xmlutil-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jexl/commons-jexl/1.0/commons-jexl-1.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/store/excalibur-store/2.1/excalibur-store-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-web/2.0/spring-web-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-core/1.0-SNAPSHOT/commons-jci-core-1.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-fam/1.0-SNAPSHOT/commons-jci-fam-1.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/pool/excalibur-pool-api/2.1/excalibur-pool-api-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/net/sf/ehcache/ehcache/1.2/ehcache-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-resolver/xml-resolver/1.1/xml-resolver-1.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xalan/xalan/2.7.0/xalan-2.7.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-context/2.0/spring-context-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/instrument/excalibur-instrument-api/2.1/excalibur-instrument-api-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-blocks-fw-impl/1.0.0-SNAPSHOT/cocoon-blocks-fw-impl-1.0.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-io/commons-io/1.2/commons-io-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-beans/2.0/spring-beans-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xerces/xercesImpl/2.8.0/xercesImpl-2.8.0.jar]
2006-11-27 17:04:37.447::INFO: Bound java:comp/env/greeting=Hello, World
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-27 17:04:42.619:/:INFO: Loading Spring root WebApplicationContext
2006-11-27 17:04:46.510:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
2006-11-27 17:04:47.369::WARN: failed
[EMAIL PROTECTED]/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
2006-11-27 17:04:47.369::WARN: failed [EMAIL PROTECTED]
2006-11-27 17:04:47.369::WARN: failed [EMAIL PROTECTED]
2006-11-27 17:04:48.166::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-27 17:04:48.166::WARN: failed [EMAIL PROTECTED]
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failure
Embedded error: Cannot invoke listener
[EMAIL PROTECTED]
Couldn't find the sitemap /sitemap.xmap
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failure
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:340)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:272)
at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:177)
at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: java.lang.RuntimeException: Cannot invoke listener
[EMAIL PROTECTED]
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke(ShieldingListener.java:181)
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitialized(ShieldingListener.java:204)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
--------------------
Luca Morandini
www.lucamorandini.it
--------------------