Page 1 of 1
Debugging Saxon - Java vs OpenJDK
Posted: Mon Mar 05, 2012 6:37 pm
by Feargal
Hi
I have a library of XSLT files which are running on an old Solaris box. We are looking to replace this box with an Ubuntu server (10.04LTS). But when I try to run the transforms on the new server I get errors. On Ubuntu now, Java is not available by default and installing it is a bit of a nightmare as you have to do it 'the Oracle way'.
The recommendation - including from Oracle - is to use OpenJDK, and that is included in the Ubuntu repos by default. I am assuming the errors are caused by some slight difference between Saxon on real Java (on Solaris) and Saxon on OpenJDK on Ubuntu. That is the only obvious difference between the platforms.
But I cannot - as far as I can see - run the Oxygen xslt debugger in an OpenJDK context.
Is there a way to debug these XSLTs in Oxygen using an OpenJDK context instead of Java.
My development platform is a MacBookPro.
Re: Debugging Saxon - Java vs OpenJDK
Posted: Mon Mar 05, 2012 7:04 pm
by adrian
Hello,
We are not aware of such issues between Saxon and Java/OpenJDK.
The different environment may be the cause. What are the errors that you are getting?
What version and build number of Oxygen are you using(Help > About)?
What Oxygen kit did you install on Ubuntu?
For Ubuntu we recommend using one of the Oxygen Linux distributions(32/64 depending on the OS architecture) that includes a Java SE 6 JRE from Oracle:
http://www.oxygenxml.com/download_oxyge ... l?os=Linux
You can also use the "All Platforms" kit(.tar.gz) with the system installed OpenJDK 6.
What is the relation of this setup with the Mac development platform?
Regards,
Adrian
Re: Debugging Saxon - Java vs OpenJDK
Posted: Tue Mar 06, 2012 9:56 am
by Feargal
Hi Adrian
Thanks for replying.
Just to clarify, I am not running Oxygen on the Ubuntu box.
Over there, I am just running a transform in a shell script of the format
java -jar /user/local/bin/saxon/saxon9.jar -o $outfile.xml $fromfile.xml $transform.xslt
That works perfectly fine on the Solaris box(with 'real' java) but raises an error on the Ubuntu box with (openJDK)
Unfortunately I cannot test the transform on my Oxygen installation ( on my Mac) in an OpenJDK context to try and isolate the error.
Can I install OpenJDK on my Mac and run oxygen in that context?
I'm running Oxygen 13.1.
Re: Debugging Saxon - Java vs OpenJDK
Posted: Tue Mar 06, 2012 1:36 pm
by adrian
Hi,
Note that while it works, OpenJDK 6 on the Mac is rather slow and clunky and you may encounter some issues with it in Oxygen.
For Tiger(10.4) and Leopard(10.5) there is a FreeBSD port(SoyLatte) of OpenJDK here:
http://landonf.bikemonkey.org/static/soylatte/
For Snow Leopard(10.6) and Lion(10.7) I only found OpenJDK 7:
http://openjdk.java.net/projects/macosx-port/
But I've seen reports of OpenJDK 6 on Snow Leopard so it probably works.
Please note that currently OpenJDK is not officially supported by Oxygen on the Mac and we cannot recommend it. This means you may encounter some issues with it(especially graphical) due to lack of testing.
To run Oxygen with the Java that is currently set in the PATH, open a Terminal windows and execute the command line startup script:
sh oxygenMac.sh
BTW, wouldn't it be easier to install and use Java SE 6 on the Ubuntu machine? Or is it a requirement to get Saxon to work with OpenJDK?
http://www.oracle.com/technetwork/java/ ... index.html
Regards,
Adrian
Re: Debugging Saxon - Java vs OpenJDK
Posted: Tue Mar 06, 2012 4:59 pm
by Feargal
Would it be easier?
In theory, yes!
But Oracle seem to be making it ever harder.
Unfortunately it's not as simple as sudo apt-get install anymore
I have managed to get a download from the Oracle site, but there is no installation script. It's meant to work from a simple unpack.
But it doesn't for me at present. And the recommendation seems to be to move down the OpenJDK route. Even Oracle are saying that now.
I was hoping it might be relatively straight forward to test it under OpenJDK. I'm sure it's something simple in the transform. I've just no idea where!
Re: Debugging Saxon - Java vs OpenJDK
Posted: Fri Mar 09, 2012 1:26 pm
by Feargal
I note that the linux version of oXygen includes a JavaVM in its installer.
If I downloaded and installed that, I can use Oxygen on that machine, can I not?
My licence is for me, on any machine, isn't it?
So I could use that JavaVM in my own scripts, couldn't I?
Would it be found using ?
sudo update-alternatives --config java
Re: Debugging Saxon - Java vs OpenJDK
Posted: Fri Mar 09, 2012 1:46 pm
by Feargal
OK, that has worked but
sudo update-alternatives --config java
has not found the new JavaVM
So where is that installed?
Re: Debugging Saxon - Java vs OpenJDK
Posted: Fri Mar 09, 2012 2:14 pm
by adrian
Hi,
The license is user based, so if you have a license in your name, you are the only one allowed to use Oxygen on that machine or any other.
Note that Oxygen has a bundled JRE that it keeps for itself. It does not deploy it as a system JRE.
You can download the JRE from Oracle and it's the same thing:
http://www.oracle.com/technetwork/java/ ... index.html
Note that Java doesn't have to be installed as a package, You can just launch it after unpacking it: /path/to/my/java/bin/java
So for Saxon just use:
Code: Select all
/path/to/my/java/bin/java -jar /user/local/bin/saxon/saxon9.jar -o $outfile.xml $fromfile.xml $transform.xslt
Regards,
Adrian