Page 1 of 1
Using a newer version of the DITA-OT than the one supplied b
Posted: Mon Jan 12, 2015 6:27 pm
by dagoss
I'm having issues trying to use a newer DITA-OT with Oxygen 15.2 (attempting to use version 2.0 instead of 1.7).
I followed
these instructions from the Oxygen user manual.
When trying to use the pdf2 transformation, I get the following error:
Code: Select all
BUILD FAILED
C:\Program Files\DITA-OT2.0\build.xml:40: The following error occurred while executing this line:
C:\Program Files\DITA-OT2.0\plugins\org.dita.base\build_preprocess.xml:79: java.lang.VerifyError: Bad return type
Exception Details:
Location:
net/sf/saxon/Configuration.newExpressionParser(Ljava/lang/String;ZLnet/sf/saxon/value/DecimalValue;)Lnet/sf/saxon/expr/parser/ExpressionParser; @73: areturn
Reason:
Type 'net/sf/saxon/query/QueryParser' (current frame, stack[0]) is not assignable to 'net/sf/saxon/expr/parser/ExpressionParser' (from method signature)
I'm not really sure what this means (maybe I need to change the order of the libraries on the Advanced tab of the scenario?). I've tried using the DITA-OT 2.0 with the map outside of Oxygen, and it worked without any issues.
Re: Using a newer version of the DITA-OT than the one suppli
Posted: Tue Jan 13, 2015 11:43 am
by Radu
Hi,
Related to the instructions you followed, did you change anything in the list of libraries used by the DITA OT process (step 2)?
For example did you add references to the Saxon 9 libraries which came with DITA OT 2.0?
If you did that, the references to the Saxon 9 libraries which you added should be promoted as first entries the libraries list, before any other entries.
Regards,
Radu
Re: Using a newer version of the DITA-OT than the one suppli
Posted: Tue Jan 13, 2015 3:44 pm
by dagoss
I did not. I wasn't sure if it was a good idea to mess with those.
I went ahead and added all of the libraries in [DITA-OT2.0]/lib/, and move them to be first in the list. This gave me a different error message:
Code: Select all
BUILD FAILED
C:\Program Files\DITA-OT2.0\build.xml:40: The following error occurred while executing this line:
C:\Program Files\DITA-OT2.0\plugins\org.dita.base\build_preprocess.xml:96: The following error occurred while executing this line:
java.lang.VerifyError: class com.saxonica.config.ProfessionalConfiguration overrides final method getTypeHierarchy.()Lnet/sf/saxon/type/TypeHierarchy
On a hunch, I removed all the libraries that are
not from the OT-2.0 from the list. This resulted in the build succeeding. Will removing those libraries from the build scenario cause dramatic issues later?
Re: Using a newer version of the DITA-OT than the one suppli
Posted: Tue Jan 13, 2015 4:44 pm
by Radu
Hi,
On a hunch, I removed all the libraries that are not from the OT-2.0 from the list. This resulted in the build succeeding. Will removing those libraries from the build scenario cause dramatic issues later?
What happens is that a standard downloaded DITA OT distribution comes with certain libraries included. Oxygen also comes with certain libraries included, some libraries, like the Saxon 9 library are newer in Oxygen so by default the DITA OT bundled with Oxygen does not have certain libraries in it and the transformation scenario uses the Oxygen-bundled JAR libraries instead. This problem occurs because somehow a part of the Java code in the DITA OT 2.0 loads parts of the the older Saxon 9 library which comes with DITA OT 2.0 but the newer Saxon 9 is also in the classpath.
I do not know how many libraries you removed from the list. Ideally you replaced them with the equivalents from the DITA OT 2.0 folder (where applicable). If the transformation works for you, you probably did. Basically right now you are running with the libraries the DITA OT 2.0 contains, exactly like running DITA OT 2.0 from the console.
I tested this problem and a possibility to use Oxygen's JAR libraries with DITA OT 2.0 would have been to edit the original Libraries list and promote the path to the library:
${oxygenHome}/lib/saxon9ee.jar
to be above the path to
${dita.dir.url}/lib/. So this would be an alternative.
Regards,
Radu
Re: Using a newer version of the DITA-OT than the one suppli
Posted: Sun Feb 08, 2015 7:54 am
by jayaram
Hi,
I am trying to do this (use DITA-OT 2.0 with OxygenXML) but after reading this thread, I don't quite understand exactly the steps I have to take. Could you please provide some explicit instructions here so I don't mess up.
Regards,
Jayaram
Re: Using a newer version of the DITA-OT than the one suppli
Posted: Mon Feb 09, 2015 9:49 am
by Radu
Hi Jayaram,
Please see some steps below:
1) Create or edit the DITA OT transformation scenario using the Configure Transformation Scenario toolbar button from the DITA Maps Manager view.
2) In the Parameters tab set the dita.dir parameter to point to the external DITA OT installation.
3) In the Advanced tab press the Libraries button, uncheck the checkbox in the libraries dialog and promote the path to the library:
${oxygenHome}/lib/saxon9ee.jar
to be above the path to ${dita.dir.url}/lib/.
In Oxygen 17 which will appear in a couple of months you will no longer need to perform (3).
Regards,
Radu