cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject [PATCH] - fix for broken command-line operation
Date Sun, 07 May 2000 17:36:23 GMT

kunertr@cs.tu-berlin.de wrote:

>this is what I get starting cocoon from commandline, adding a copy of
>cocoon.properties to every servlet context did not work :(.
>
>roman@dionysos:/opt/cocoon-1.7.3 > java -classpath
>/usr/lib/java/lib/tools.jar:/opt/cocoon-1.7.3/lib/xalan_1_0_1.jar:/opt/cocoon-1.7.3/lib/xerces_1_0_3.jar:/opt/cocoon-1.7.3/lib/fop_0_12_1.jar:/opt/cocoon-1.7.3/lib/stylebook-1.0-b2.jar:/opt/cocoon-1.7.3/lib/servlet_2_2.jar:/opt/cocoon-1.7.3/bin/cocoon.jar
>org.apache.cocoon.Cocoon -p /opt/cocoon-1.7.3/conf/cocoon.properties
>/home/roman/hsh/entry.xml /home/roman/hsh/entry.xsl
>Exception in thread "main" java.lang.NullPointerException
>         at java.util.Hashtable.get(Hashtable.java, Compiled Code)
>         at org.apache.cocoon.Engine.getInstance(Engine.java, Compiled
>Code)
>         at org.apache.cocoon.EngineWrapper.<init>(EngineWrapper.java,
>Compiled Code)
>         at org.apache.cocoon.Cocoon.main(Cocoon.java, Compiled Code)


Congratulations, you've found a bug! :) Here's the patch to fix it:

--- src/org/apache/cocoon/EngineWrapper.java~   Sat May  6 06:09:20 2000
+++ src/org/apache/cocoon/EngineWrapper.java    Sun May  7 17:33:18 2000
@@ -78,7 +78,7 @@
     private Engine engine;

     protected EngineWrapper(Configurations confs) throws Exception {
-        this.engine = Engine.getInstance(confs, null);
+        this.engine = Engine.getInstance(confs, new Object ());
     }

     public void handle(PrintWriter out, File pathToDocument) throws 
Exception {

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message