You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Sprague <sp...@mail.isc.rit.edu> on 2001/07/06 18:53:35 UTC

Calling Cocoon form the command line.

Hi,

I've been trying to call cocoon from the command line like so, I know it's ugly. Basically the classpath contains all the jars need to run cocoon plus some weblogic stuff. 

java -classpath g:\javalibs\cocoon-1.8.2\lib\fop_0_15_0.jar;g:\javalibscocoon-1.8.2\lib\sax-bugfix.jar;g:\javalibs\cocoon-1.8.2\lib\turbine-pool.jar;g:\javalibs\cocoon-1.8.2\lib\xalan_1_2_D02.jar;g:\javalibs\cocoon-1.8.2\lib\xerces_1_2.jar;g:\javalibs\cocoon-1.8.2\lib\w3c.jar;e:\weblogic\cocoonwar\WEB-INF\lib\cocoon.jar;e:\weblogic\lib\weblogicaux.jar;e:\weblogic\classes  org.apache.cocoon.Cocoon  -p e:\weblogic\cocoonwar\WEB-INF\cocoon2.properties  E:\Temp\af_temp\a-a-July-06-2001.xml  E:\Temp\af_temp\a-a-July-06-2001.pdf

This is the output

E:\weblogic>java -classpath g:\javalibs\cocoon-1.8.2\lib\fop_0_15_0.jar;g:\javalibscocoon-1.8.2\lib\sax-bugfix.jar;g:\javalibs\cocoon-1.8.2\lib\turbine-pool.jar;g:\javalibs\cocoon-1.8.2\lib\xalan_1_2_D02.jar;g:\javalibs\cocoon-1.8.2\lib\xerces_1_2.jar;g:\javalibs\cocoon-1.8.\lib\w3c.jar; e:\weblogic\cocoonwar\WEB-INF\lib\cocoon.jar;e:\weblogic\lib\weblogicaux.jar;e:\weblogic\classes  org.apache.cocoon.Cocoon  -p e:\weblogic\cocoonwar\WEB-INF\cocoon2.properties  E:\Temp\af_temp\a-a-July-06-2001.xml  E:\Temp\af_temp\a-a-July-062001.pdf
FOP_VERSION = FOP 0.15
FOP_VERSION_NO = 0.15
Exception in thread "main" java.lang.NullPointerException
        at org.apache.cocoon.Engine.handle(Engine.java:484)
        at org.apache.cocoon.EngineWrapper.handle(EngineWrapper.java:87)
        at org.apache.cocoon.Cocoon.main(Cocoon.java:311)

As you can see, it's not working. I've looked at the source code a bit. But I'm not sure what's going on.

I'm trying to generated a PDF file. The idea was to just call cocoon from the command line and have it process the XML file using an XSL which creates the FO code. Basically this all works when done through the browser. However I need to store the PDF on the server, not return it to the user.

I'm using Cocoon 1 v1.8.2
Any thoughts ?

Thank
Paul