Daniel Fagerstrom wrote:
Patrick Refondini skrev:

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


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.

No idea why the 4.0 is included, some transitive dependency must be faulty. It didn't happen some weeks ago.

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.


I have this recurrent problem when running / packaging trunk samples:

cocoon_trunk/dists/cocoon-dist-samples> mvn -e package
(...)
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp webResources to /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples [INFO] Assembling webapp cocoon-dist-samples in /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples [INFO] Expanding: /home/prefondini/.m2/repository/org/apache/cocoon/cocoon-webapp/2.2.0-M2-SNAPSHOT/cocoon-webapp-2.2.0-M2-SNAPSHOT.war into /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/war/work/cocoon-webapp-2.2.0-M2-SNAPSHOT
[INFO] Overlaying 1 war(s).
[INFO] Generating war /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war [INFO] Building war: /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
[INFO] [cocoon:deploy {execution: default}]
[INFO] Exploding webapp...
[INFO] Copy webapp webResources to /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples [INFO] Assembling webapp cocoon-dist-samples in /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples [INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704) at org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680) at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600) at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379) at org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182) at org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) 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)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Tue Nov 28 14:31:29 CET 2006
[INFO] Final Memory: 12M/23M
[INFO] ------------------------------------------------------------------------

The problem seems to happen at cocoon:deploy ... But the above stacktrace does not seem very useful, at least to me...

Although it's not as FATAL as it claims. It does not prevent me to successfully use mvn jetty:run afterward. I could even successfully deploy and run the produced cocoon-samples.war in apache-tomcat-5.5.20


Test Context:

Cocoon trunk at revision 480034
Java version "1.5.0_09" on Linux
(I will test that on MacOSX jdk 1.5 soon and report).
Maven version: 2.0.4

Patrick

The cocoon:deploy plugin expects a certain directory to be present, that is created a little bit later in the plugin. If you build it twice it will work.
I checked out the latest trunk sources and built it using:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean install
and a couple more
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false install
(no clean) to get around naugthy mirrors no providing what I needed.

Then cd core/cocoon-webapp/
mvn package
mvn jetty:run
No single problem !

In dists/cocoon-dist-samples/
mvn package still gives the exact same error as above even when run several times (whithout clean of course)

mvn jetty:run still plays the samples nicely ...

Test Context:

Cocoon trunk at revision 480141
java version "1.5.0_06" on MacOSX 10.4.6
Maven version: 2.0.4

See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2 and the rest of the thread.
I did not read the thread yet but I will. Maybe is there something more I overlooked.

Thanks for the hint,

Patrick


/Daniel


Reply via email to