Page 1 of 1
DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 9:46 am
by Patrik
Hi,
I'm trying to use DITA-OT 2.2 with Oxygen 17.0 but get an error when generating a PDF:
Code: Select all
BUILD FAILED
C:\Testteamserver\DITA-OT\build.xml:42: The following error occurred while executing this line:
C:\Testteamserver\DITA-OT\plugins\org.dita.base\build_preprocess.xml:226: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
With Oxygen 17.1 it's working fine.
Is there anything I can do to make it work with Oxygen 17.0 as well?
Thanks and regards,
Patrik
Re: DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 10:11 am
by Radu
Hi Patrik,
You should edit the transformation scenario and in the "Advanced" tab click the "Libraries" button and add a new link to the library:
DITA-OT\lib\commons-io-2.4.jar
In DITA OT 2.1.0 the library has a different name so Oxygen by default added that JAR library name to the build process.
Regards,
Radu
Re: DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 12:07 pm
by Patrik
Hi Radu,
thanks for the hint.
Simply adding the lib didn't help, though. I had to
- uncheck "Allow <oXygen/> to add high priority libraries to classpath" und
- change the first entry to "${configured.ditaot.dir.url}/lib/commons-io-2-4.jar".
Then it works fine.
Regards,
Patrik
Re: DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 12:13 pm
by Radu
Hi Patrik,
You took the right decision. The problem is that in that hard coded list of libraries Oxygen adds by default there is also a reference to the "commons-io-1.3.1.jar" shipped with Oxygen so you needed the reference to the latest IO library to be before that in order to ensure that it is used.
I have an opened issue for having some kind of auto detection in Oxygen about the libraries which need to be used in the classpath in order to start the DITA OT process, I will try to increase its priority.
Regards,
Radu
Re: DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 12:32 pm
by Patrik
Hi Radu,
also note that "oxygen.jar" contains an (older) implmentation of the class "org.apache.commons.io.FileUtils" as well. So removing the "commons-io-1.3.1.jar" would probably not be enough. And when I removed the "oxygen.jar" from the list of libraries DITA-OT could no more load the schema:
Code: Select all
C:\Testteamserver\DITA-OT\plugins\org.dita.base\build_preprocess.xml:42: Failed to run pipeline: [DOTJ012F][FATAL] Failed to parse the input file 'file:/[...]/reference.dita'.: file:/[...]/reference.dita Line 4:cvc-elt.1.a: Cannot find the declaration of element 'reference'.
However, personally I'm fine with my solution.
Regards,
Patrik
Re: DITA-OT 2.2 + Oxygen 17.0 = NoSuchMethodError
Posted: Wed Dec 09, 2015 12:36 pm
by Radu
Hi Patrik,
Indeed the oxygen.jar contains inside it patches, patches both for an older version of Apache IO (1.3.1) and for other libraries including the Xerces library. So you took the right decision to move the reference to the new IO library as high as possible in the list.
Regards,
Radu