Problem running stylesheetDocumentation.sh

Oxygen general issues.
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Problem running stylesheetDocumentation.sh

Post by martindholmes »

Hi there,

I'm not really sure whether this is an oXygen issue or not, but I'm posting here in the hope that someone might have seen this and solved it before.

I'm in the process of setting up a Jenkins "Continuous Integration Server" as part of a TEI project, and having trouble getting one of the builds to run due to a failure to run the stylesheetDocumentation.sh script. This is what the error looks like:

Code: Select all

using oXygen stylesheet documentation generator
for i in latex2/tei.xsl xhtml2/tei.xsl fo2/tei.xsl odds2/odd2odd.xsl odds2/odd2relax.xsl odds2/odd2dtd.xsl slides2/teihtml-slides.xsl slides2/teilatex-slides.xsl profiles/default/csv/to.xsl profiles/default/docx/to.xsl profiles/default/dtd/to.xsl profiles/default/epub/to.xsl profiles/default/fo/to.xsl profiles/default/html/to.xsl profiles/default/latex/to.xsl profiles/default/lite/to.xsl profiles/default/oo/to.xsl profiles/default/relaxng/to.xsl profiles/enrich/docx/to.xsl profiles/enrich/fo/to.xsl profiles/enrich/html/to.xsl profiles/enrich/latex/to.xsl profiles/iso/docx/to.xsl profiles/iso/fo/to.xsl profiles/iso/html/to.xsl profiles/iso/latex/to.xsl profiles/default/docx/from.xsl profiles/enrich/docx/from.xsl profiles/default/csv/from.xsl profiles/default/oo/from.xsl profiles/default/docbook/from.xsl profiles/default/p4/from.xsl profiles/default/docx/from.xsl; do echo process doc for $i; export ODIR=release/common/doc/tei-xsl-common/`dirname $i`; /usr/share/oxygen/stylesheetDocumentation.sh $i -cfg:doc/oxydoc.cfg; (cd `dirname $i`; tar cf - release) | tar xf -; rm -rf `dirname $i`/release; done
process doc for latex2/tei.xsl
Script file for generating XSL Stylesheet documentation
using oXygen XML Editor stylesheet documentation generator.
/usr/share/oxygen/stylesheetDocumentation.sh: 41: /usr/share/oxygen/jre/bin/java: not found
Documentation generation did not succeed, return code 127
The oXygen files are all where they're supposed to be (/usr/share/oxygen/), including the jre files, and everything has r-x permissions for all, so I'm a bit puzzled by this. Anyone have any ideas?

All help appreciated,
Martin
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Problem running stylesheetDocumentation.sh

Post by adrian »

Hello,

Have you tried running directly the schema documentation script from the command line?
sh /usr/share/oxygen/stylesheetDocumentation.sh
Does it work? It should output the command line arguments.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem running stylesheetDocumentation.sh

Post by martindholmes »

Yes, I should have mentioned that I've tried that. I get the same result:

Code: Select all

sh /usr/share/oxygen/stylesheetDocumentation.sh
Script file for generating XSL Stylesheet documentation
using oXygen XML Editor stylesheet documentation generator.
/usr/share/oxygen/stylesheetDocumentation.sh: 41: /usr/share/oxygen/jre/bin/java: not found
Documentation generation did not succeed, return code 127
The error seems completely nonsensical, though, because java is there:

Code: Select all

file /usr/share/oxygen/jre/bin/java
/usr/share/oxygen/jre/bin/java: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
hcmc@Jenkins2:/usr/share/oxygen$
and it's world read and execute:

Code: Select all

ls -al /usr/share/oxygen/jre/bin/java
-rwxr-xr-x 1 hcmc hcmc 47308 2011-01-16 08:41 /usr/share/oxygen/jre/bin/java
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem running stylesheetDocumentation.sh

Post by martindholmes »

Could this sort of error result from running a 32-bit oXygen package (with a 32-bit JRE) on 64-bit Ubuntu?

Cheers,
Martin
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Problem running stylesheetDocumentation.sh

Post by adrian »

Yes, that's it. Ubuntu 64-bit doesn't have the libraries to run 32-bit executables. You need the Linux 64-bit Oxygen package or replace the JRE(Java SE) from your current installation with a 64-bit one:
http://www.oracle.com/technetwork/java/ ... index.html

But how did you install it in the first place? The 32-bit installation kit shouldn't run on Ubuntu 64-bit.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem running stylesheetDocumentation.sh

Post by martindholmes »

It came courtesy of the TEI Debian package repo here:

http://tei.oucs.ox.ac.uk/teideb/binary

I was just following some instructions to get the TEI packages installed, and never realized there were no 64-bit versions. The 32-bit ones seemed to install just fine using apt-get, but I guess they'll never work.

I'm in touch with the maintainer to see if there's any chance of a 64-bit package, or whether I'll have to rebuild my server starting with a 32-bit OS.

Thanks for the help, as always!
Martin
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Problem running stylesheetDocumentation.sh

Post by adrian »

Only the Java Runtime Environment(JRE) is relevant to the architecture(32/64), the rest of the Oxygen package should work on any architecture(it's cross-platform Java code and generic bash scripts).

Like I said before, you can keep the current package and simply replace the JRE from the oxygen/jre folder with a 64-bit Java SE from Oracle.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem running stylesheetDocumentation.sh

Post by martindholmes »

I just moved the JRE elsewhere, so now it's presumably using the installed Sun Java. But I'm getting another error now:

Code: Select all

using oXygen XML Editor stylesheet documentation generator.
Exception in thread "main" java.lang.ExceptionInInitializerError
at ro.sync.xsl.documentation.XSLStylesheetDocumentationGenerator.main(Unknown Source)
Caused by: java.lang.RuntimeException: The preferences directory: /root/.com.oxygenxml
cannot be accessed !/n Please check the read/write access on that folder and its ancestors !
There is no such directory, of course. The Jenkins process that's initiating the stylesheet script file is apparently running as root, so perhaps that's why it's looking there for preferences, but this is a headless server that doesn't need any GUI layout information. What would it be looking for in the preferences directory?
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Problem running stylesheetDocumentation.sh

Post by adrian »

First you should check what JRE you are currently using, type in the console: java -version
It has to be Java SE from Sun/Oracle, Oxygen does not support OpenJDK or other open source JVMs.

Additionally, Oxygen XML Editor(and its command line/GUI tools) keeps the license key and options in a folder named .com.oxygenxml from the home folder. Make sure you have read/write access in the home folder(/root in your case) as the logged user that starts Oxygen(or its tools).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem running stylesheetDocumentation.sh

Post by martindholmes »

It's the Sun Java:

hcmc@Jenkins2:~$ java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

But I'd forgotten all about the licence. Since it's headless, I've never started oXygen up so it's never asked for a licence key.

Cheers,
Martin
Post Reply