cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Haurie <Xavier.Hau...@analog.com>
Subject running from the command line
Date Wed, 21 Feb 2001 18:53:40 GMT
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 $*




-- 
]\  Xavier Haurie   e:Xavier.Haurie@analog.com
] \ Engineer, System-Level Integration Development Group
] / t:781.937.2344  f:781.937.1014
]/  Analog Devices, 804 Woburn St. MS 111, Wilmington MA 01887

Mime
View raw message