Hi Guys

On 22 Nov 2006, at 00:22, Daniel Fagerstrom wrote:

Mark Lundquist skrev:
On Nov 21, 2006, at 12:36 PM, Mark Lundquist wrote:
    On Nov 21, 2006, at 12:21 PM, Daniel Fagerstrom wrote:
Testing again, it happens to me also when I do a "mvn package"
        after a "mvn clean", if I do a second "mvn package" it works.
    Yes, OK... the second time worked.
    Now then, how do I run the webapp? "mvn jetty:run" invoked from
    cocoon-dist-samples yields
[INFO] The plugin 'org.apache.maven.plugins:maven-jetty- plugin' does
    not exist or no valid version could be found
    thx,
    —ml—
OK... /now/, I've done the following:
1) svn up'd (to get Jeremy's commit that is supposed to fix something or other)

It includes a snippet to the pom that makes the jetty:run goal available.

2) maven -Dmaven.test.skip -Dallblocks - Dmaven.war.shieldingclassloader=false install
3) cd dists/cocoon-dist-samples
4) mvn package
...and now, I get the NPE no matter how many times I do "mvn package":
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.deployMonolithicC ocoonAppAsWebapp(AbstractDeployMojo.java:182) at org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute (DeployExplodedMojo.java:64)

Don't know why you get that problem. For me it worked after having updating to current and having recompiled.

Anyway, the problem lies in the use of the cocoon deployer plugin. And it is not necessary to use that. The only thing it adds IIUC is the shielding classloader that you have turned of anyway.

To remove the use of the cocoon deployer you remove the following snippet from the pom for cocoon-dist-samples:

      <plugin>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-deployer-plugin</artifactId>
        <version>1.0.0-M2-SNAPSHOT</version>
        <configuration>
          <serverVersion>2.2</serverVersion>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

OK, I removed this plugin from dists/cocoon-dist-samples/pom.xml

ran this from root :

$mvn -Dmaven.test.skip -Dallblocks - Dmaven.war.shieldingclassloader=false install

and it successfully compiled
next I ran this from ists/cocoon-dist-samples/ :

$mvn package

again, that was successful
then :

$mvn jetty:run

and it fails with :

<snip/>
2006-11-22 11:51:59.299::INFO: Bound java:comp/env/greeting=Hello, World 2006-11-22 11:52:35.646::WARN: failed [EMAIL PROTECTED]/,file:/ Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_2/dists/ cocoon-dist-samples/target/cocoon-samples/}
2006-11-22 11:52:35.647::WARN:  failed [EMAIL PROTECTED]
2006-11-22 11:52:35.647::WARN:  failed [EMAIL PROTECTED]
2006-11-22 11:52:35.660::INFO: Started SelectChannelConnector @ 0.0.0.0:8888
2006-11-22 11:52:35.661::WARN:  failed [EMAIL PROTECTED]
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.StackOverflowError
        at java.util.zip.ZipFile.getEntry(ZipFile.java:252)
        at java.util.jar.JarFile.getEntry(JarFile.java:200)
        at java.util.jar.JarFile.getJarEntry(JarFile.java:183)
at sun.misc.URLClassPath$JarLoader.getResource (URLClassPath.java:674)
        at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.apache.cocoon.maven.deployer.servlet.ShieldedClassLoader.getClass (ShieldedClassLoader.java:58) at org.apache.cocoon.maven.deployer.servlet.ShieldedClassLoader.loadClass (ShieldedClassLoader.java:83)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.cocoon.maven.deployer.servlet.ShieldingListener.init (ShieldingListener.java:112) at org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitia lized(ShieldingListener.java:202) at org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke (ShieldingListener.java:152)

<snip/> it gets repeated 100's of times

[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44 seconds
[INFO] Finished at: Wed Nov 22 11:52:35 GMT 2006
[INFO] Final Memory: 43M/63M
[INFO] ------------------------------------------------------------------------
2006-11-22 11:52:35.996::INFO:  Shutdown hook executing
2006-11-22 11:52:35.996::INFO:  Shutdown hook complete


:-/


regards Jeremy

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to