W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2010

Running Calabash from a terminal (Linux)

From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Date: Wed, 16 Jun 2010 18:30:01 +0200
Message-ID: <AANLkTinfUFn9p6fSKBThpgkfWEvLh_xpA8Tnp3rLyQhE@mail.gmail.com>
To: xproc-dev@w3.org
I'm trying to get Calabash running from a terminal, but I'm getting a
NullPointerException.

To reproduce my problem on a fresh Ubuntu 10.04 installation:

1. Activate the "Community-maintained Open Source software
(universe)"-repository in *System -> Administration -> Software Sources
*
2. Install Java
sudo apt-get install openjdk-6-jdk

3. Install Saxon
wget
http://sourceforge.net/projects/saxon/files/Saxon-HE/9.2/saxonhe9-2-1-1j.zip/download
unzip saxonhe9-2-1-1j.zip -d saxon9he
sudo mv saxon9he/saxon9he.jar /usr/share/java/
sudo ln --symbolic -f -T /usr/share/java/saxon9he.jar
/usr/share/java/saxon.jar

4. Install Calabash
wget http://xmlcalabash.com/download/calabash-0.9.21.zip
unzip calabash-0.9.21.zip
sudo mv calabash-0.9.21/lib/calabash.jar /usr/share/java/
gksudo gedit /usr/bin/calabash

*---- start /usr/bin/calabash ----*
#!/bin/sh

CLASSPATH=/usr/share/java/calabash.jar\
:/usr/share/java/saxon.jar
*# I also tried adding the saxon9-dom.jar included in the
# oXygen installation to the classpath with no success.
# Saxon 9.2 HE doesn't have a saxon9-dom.jar anymore.
*
java -Xbootclasspath/p:$CLASSPATH com.xmlcalabash.drivers.Main $@
*---- end /usr/bin/calabash ----*

sudo chmod +x /usr/bin/calabash

5. Run test
calabash calabash-0.9.21/xpl/pipe.xpl

java.lang.NullPointerException
    at net.sf.saxon.Configuration.<clinit>(Configuration.java:231)
    at net.sf.saxon.s9api.Processor.<init>(Processor.java:50)
    at
com.xmlcalabash.core.XProcConfiguration.<init>(XProcConfiguration.java:83)
    at com.xmlcalabash.drivers.Main.run(Main.java:97)
    at com.xmlcalabash.drivers.Main.main(Main.java:78)
Exception in thread "main" java.lang.ExceptionInInitializerError
    at net.sf.saxon.s9api.Processor.<init>(Processor.java:50)
    at
com.xmlcalabash.core.XProcConfiguration.<init>(XProcConfiguration.java:83)
    at com.xmlcalabash.drivers.Main.run(Main.java:97)
    at com.xmlcalabash.drivers.Main.main(Main.java:78)
Caused by: java.lang.RuntimeException: Failed to load configuration defined
in edition.properties
    at net.sf.saxon.Configuration.<clinit>(Configuration.java:277)
    ... 4 more
Caused by: java.lang.NullPointerException
    at net.sf.saxon.Configuration.<clinit>(Configuration.java:231)
    ... 4 more


Now, this looks like a problem with Saxon and/or how Calabash are using it.
I also suspect it might have to do with the update from Saxon 9.1 go 9.2. I
doubt it's a problem with Java itself, since I can run XProc scripts using
oXygen on the same computer. I also have the same problem using both
openjdk-6-jdk and sun-java6-jdk and both 32- and 64-bit Ubuntu
installations.

It seems like it was solved by someone using Eclipse by "add[ing] a not used
jar or zip file into the library section". I'm not sure what is meant by
that but just for the heck of it I tried adding an empty.jar file to the
classpath... which did nothing:
http://groups.google.com/group/xslt_cakupan/browse_thread/thread/f42777bd6fb5b59e

Installing and adding Saxon-B to the classpath just made things worse, so I
guess that's not the way to go either.

What am I missing? Classpath problem? Missing configuration file of some
sort?

Regards
Jostein
Received on Wednesday, 16 June 2010 16:30:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 June 2010 16:30:38 GMT