Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 342 invoked by uid 500); 5 Oct 2001 03:45:27 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 331 invoked from network); 5 Oct 2001 03:45:27 -0000 Date: Fri, 5 Oct 2001 13:47:01 +1000 From: Jeff Turner To: cocoon-dev@xml.apache.org Subject: [PATCH] Run-from-jar broken Message-ID: <20011005134701.D9342@kermit.socialchange.net.au> Mail-Followup-To: cocoon-dev@xml.apache.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline User-Agent: Mutt/1.3.19i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, 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(Main.java:241) 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 ./build.sh 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 ;) --Jeff --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Manifest.mf.diff" Index: src/Manifest.mf =================================================================== RCS file: /home/cvspublic/xml-cocoon2/src/Manifest.mf,v retrieving revision 1.3 diff -u -r1.3 Manifest.mf --- src/Manifest.mf 2001/09/25 10:17:30 1.3 +++ src/Manifest.mf 2001/10/05 03:40:19 @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Main-Class: org.apache.cocoon.Main -Class-Path: avalon-framework-4.0.jar avalon-excalibur-4.0.jar batik-all.jar - bsf.jar fop-0_20_1.jar jakarta-regexp-1.2.jar jstyle.jar logkit-1.0b5.jar +Class-Path: avalon-framework-4.0.jar avalon-excalibur-4.0.jar batik-all.jar \ + bsf.jar fop-0_20_1.jar jakarta-regexp-1.2.jar jstyle.jar logkit-1.0b5.jar \ rhino.jar xalan-2.2.0-dev.jar xerces_1_4_3.jar xt.jar Name: org/apache/cocoon/components/markup/sitemap/java/sitemap.xsl --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org --y0ulUmNC+osPPQO6--