You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by AK...@burntsand.com on 2001/02/20 20:47:45 UTC

Using FOP with Cocoon

I was interested in using FOP with Cocoon to generate a PDF page.
 
Do I have to separately download FOP for that or is it already
built into Cocoon. In case it is, could some kind sould care to
explain how FOP is integrated with Cocoon.
 
Thanks in advance
 
AYUB KHAN

1500, 1075 West Georgia Street
Vancouver, B.C.   V6E 3C9

(604) 642-2329   Off.
AKhan@burntsand.com <ma...@burntsand.com>  

 <http://www.burntsand.com/>  

running from the command line

Posted by Xavier Haurie <Xa...@analog.com>.
Hi, I recently downloaded the tar file for Cocoon 1.8.2
on Solaris and tried to make it run from the command line. I get a 
null pointer exception:

> cocoon.sh -A netscape hello-page.xml 
using java in [/proj/reuse/JavaSoft/j2sdk1_3_0]
TurbineResources all set!!
FOP_VERSION = FOP 0.15
FOP_VERSION_NO = 0.15
[org.apache.cocoon.Engine@2943240] Starting request
[org.apache.cocoon.Engine$Block@2570525] Locking: null:null:none://Cocoon
1.8.2:-1null?null
[org.apache.cocoon.Engine$Block@2570525] Total locks for all pages: 1
[org.apache.cocoon.Engine@2943240] Creating page
[org.apache.cocoon.Engine@2943240] Document produced
[org.apache.cocoon.Engine@2943240] Document processed
[org.apache.cocoon.Engine@2943240] Document formatted
[org.apache.cocoon.Engine$Block@2570525] Releasing lock on:
null:null:none://Cocoon 1.8.2:-1null?null
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)


what am I doing wrong?
cocoon.sh is a shell script I wrote to start Cocoon from the command line:


#!/bin/sh

# ----------------------------------------------------------------------
# Run Cocoon
#
# ----------------------------------------------------------------------
# To be able to run Xalan from any directory change XALAN_HOME to point
# to where it is installed.
# ----------------------------------------------------------------------
COCOON_HOME=/proj/reuse/Cocoon/cocoon-1.8.2


# ----------------------------------------------------------------------
# Determine JAVA_HOME where JDK is installed
# ----------------------------------------------------------------------
if [ "X" = "X$JAVA_HOME" ]
then
    echo Error:
    echo Environment variable JAVA_HOME has not been set.
    echo XALAN needs to know where JDK or JRE is installed in your host.
    echo Please set JAVA_HOME to the full path name of the root directory
    echo where JDK or JRE is installed. For example, you can set JAVA_HOME
    echo in a korn shell by the following commands:
    echo "   JAVA_HOME=/usr/jdk1.1.8"
    echo "   export JAVA_HOME"
    echo when JDK is installed in directory /usr/jdk1.1.8
    exit
fi
echo using java in 	[$JAVA_HOME]


#  --------------- JAVA/JRE 2-------------TESTED on Linux !!!! ---------------
unset CLASSPATH
CLASSPATH=$CLASSPATH:$COCOON_HOME/bin/cocoon.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/sax-bugfix.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/xerces_1_2.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/xalan_1_2_D02.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/bsf.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/bsfengines.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/fesi.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/fop_0_15_0.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/servlet_2_2.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/stylebook-1.0-b2.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/turbine-pool.jar
CLASSPATH=$CLASSPATH:$COCOON_HOME/lib/w3c.jar
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
export CLASSPATH

"$JAVA_HOME/bin/java" org/apache/cocoon/Cocoon -p
/proj/reuse/Cocoon/cocoon-1.8.2/conf/cocoon.properties $*




----

RE: Using FOP with Cocoon

Posted by Benoit Jauquet <be...@freebel.net>.
all is explained in the samples, and fop 0-13-0 is levered with the cocoon
package, if i'm not wrong.
go to xml.apache.org and read....

Ben

  -----Original Message-----
  From: AKhan@burntsand.com [mailto:AKhan@burntsand.com]
  Sent: mardi 20 février 2001 20:48
  To: cocoon-users@xml.apache.org
  Subject: Using FOP with Cocoon


  I was interested in using FOP with Cocoon to generate a PDF page.

  Do I have to separately download FOP for that or is it already
  built into Cocoon. In case it is, could some kind sould care to
  explain how FOP is integrated with Cocoon.

  Thanks in advance

  AYUB KHAN

  1500, 1075 West Georgia Street
  Vancouver, B.C.   V6E 3C9

  (604) 642-2329   Off.
  AKhan@burntsand.com