cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject [PATCH] Run-from-jar broken
Date Fri, 05 Oct 2001 03:47:01 GMT

I just tried invoking Cocoon with 'java -jar cocoon.jar', and it gives
this error:

[jeff@kermit lib]$ java -jar cocoon.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log/Priority
        at org.apache.cocoon.Main.main(

This is because in the manifest, the Class-Path spans more than one line, but
the linebreaks are not escaped with \'s. The attached patch fixes this.

Btw, general info for other people trying 'java -jar cocoon.jar':

When you first try it, and it dies claiming it needs some Avalon jars, don't
bother getting them all in your classpath; it won't help. If you read the jar
spec, it says that the "Class-Path:" manifest option *replaces* the
command-line classpath. Your command-line classpath is effectively ignored.

If you examine cocoon.jar's manifest, you'll see that the jars in "Class-Path:"
have no path. Ie, cocoon.jar must be in the same directory as the libs. So to
get 'java -jar cocoon.jar' working, you must:

 - ensure you're building with my patch applied
 - run ./ or build.bat
 - copy build/cocoon/cocoon.jar to lib/
 - in lib/, type 'java -jar cocoon.jar'. You should see:
[jeff@kermit lib]$ java -jar cocoon.jar
ERROR   10022   [        ] (): Please, specify at least one starting URI.
Please, specify at least one starting URI.

   Type 'java -jar cocoon.jar --help' for info on how to actually use it ;)


View raw message