Page 1 of 1

Error in transform after update to 12.1

Posted: Thu Jan 27, 2011 5:35 pm
by anderszvensson
Hi,

I get a strange error when transforming pdfs from DITA after updating to 12.1. The short error message is:

Code: Select all

     [java] Command line option -o requires a value
[java] Java Result: 2
I have no idea what it is referring to. I tried setting Additional arguments to -verbose as well to try to get more info, but that didn't help me much either. (See part of verbose log below).

Any ideas why this occurs and what to do about it?

Regards,

Anders

Part of verbose log (entire log wouldn't be accepted since it was too long):

Code: Select all


     [java] Executing 'c:\program files\oxygen xml author 12\jre\bin\java.exe' with arguments:
[java] '-Dxml.catalog.files=C:\projects\uponor\DITA-OT1.5.1\demo\fo/Customization/catalog.xml;C:\projects\uponor\DITA-OT1.5.1\demo\fo/cfg/catalog.xml'
[java] '-classpath'
[java] 'C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-launcher.jar;C:\Program Files\Oxygen XML Author 12\lib\author.jar;C:\Program Files\Oxygen XML Author 12\lib\resolver.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT;C:\Program Files\Oxygen XML Author 12\lib\commons-io-1.3.1.jar;C:\Program Files\Oxygen XML Author 12\lib\commons-logging-1.0.4.jar;C:\Program Files\Oxygen XML Author 12\lib\log4j.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\lib\dost-patches.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\lib\dost.jar;C:\Program Files\Oxygen XML Author 12\lib\xercesImpl.jar;C:\Program Files\Oxygen XML Author 12\lib\saxon9ee.jar;C:\Program Files\Oxygen XML Author 12\lib\saxon.jar;C:\Program Files\Oxygen XML Author 12\lib\xmlgraphics-commons-1.4.jar;C:\Program Files\Oxygen XML Author 12\lib\fop.jar;C:\Program Files\Oxygen XML Author 12\lib\batik-all-1.7.jar;C:\Program Files\Oxygen XML Author 12\lib\xml-apis-xpath.jar;C:\Program Files\Oxygen XML Author 12\lib\xml-apis-ext.jar;C:\Program Files\Oxygen XML Author 12\lib\avalon-framework-4.2.0.jar;C:\Program Files\Oxygen XML Author 12\lib\jcip-annotations.jar;C:\Program Files\Oxygen XML Author 12\lib\jeuclid-core.jar;C:\Program Files\Oxygen XML Author 12\lib\jeuclid-fop.jar;C:\Program Files\Oxygen XML Author 12\lib\jh.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\lib\jsearch.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\plugins\webhelp\lib\lucene-analyzers-3.0.0.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\plugins\webhelp\lib\lucene-core-3.0.0.jar;C:\Program Files\Oxygen XML Author 12\frameworks\dita\DITA-OT\plugins\webhelp\lib\nw-cms.jar;C:\projects\uponor\DITA-OT1.5.1\lib\dost.jar;C:\projects\uponor\DITA-OT1.5.1\lib\resolver.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-antlr.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-bcel.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-bsf.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-log4j.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-oro.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-regexp.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-apache-resolver.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-commons-logging.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-commons-net.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-contrib-1.0b3.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-jai.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-javamail.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-jdepend.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-jmf.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-jsch.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-junit.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-netrexx.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-nodeps.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-starteam.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-stylebook.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-swing.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-testutil.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-trax.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant-weblogic.jar;C:\Program Files\Oxygen XML Author 12\tools\ant\lib\ant.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-dom.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-dom4j.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-jdom.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-s9api.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-sql.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-xom.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-xpath.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9-xqj.jar;C:\projects\uponor\DITA-OT1.5.1\lib\saxon\saxon9.jar;C:\projects\uponor\DITA-OT1.5.1\lib\icu4j.jar;C:\projects\uponor\DITA-OT1.5.1\demo\fo\lib\fo.jar'
[java] 'net.sf.saxon.Transform'
[java] '-o'
[java] 'C:\DitaContent\temp/stage2.fo'
[java] '-w0'
[java] '-x'
[java] 'org.apache.xml.resolver.tools.ResolvingXMLReader'
[java] '-y'
[java] 'org.apache.xml.resolver.tools.ResolvingXMLReader'
[java] '-r'
[java] 'org.apache.xml.resolver.tools.CatalogResolver'
[java] 'C:\DitaContent\temp/stage1.xml'
[java] 'C:\projects\uponor\DITA-OT1.5.1\demo\fo/xsl/fo/topic2fo_shell_1.0_axf.xsl'
[java] 'locale=se_SE'
[java] 'customizationDir=C:\projects\uponor\DITA-OT1.5.1\demo\fo/Customization'
[java] 'artworkPrefix=file:/C:/DitaContent/out/sv-SE/golvvarme/'
[java] 'fileProtocolPrefix=file:/'
[java] 'publishRequiredCleanup=${publish.required.cleanup}'
[java] 'disableRelatedLinks=yes'
[java] 'antArgsBookmarkStyle='
[java] 'antArgsChapterLayout='
[java] 'antArgsIncludeRelatedLinks='
[java] 'antArgsGenerateTaskLabels='
[java] 'pdfFormatter=ah'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
dropping C:\Program Files\Oxygen XML Author 12\classes from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\oxygen.jar from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\oxygenEclipse.jar from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\authorEclipse.jar from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\classes from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\oxygen.jar from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\oxygenEclipse.jar from path as it doesn't exist
dropping C:\Program Files\Oxygen XML Author 12\lib\authorEclipse.jar from path as it doesn't exist
[java] Command line option -o requires a value
[java] Java Result: 2
[available] Unable to find Customization\fo\i18n\se_SE.xml
[antcall] Exiting C:\projects\uponor\DITA-OT1.5.1\demo\fo\build.xml.
[antcall] Exiting C:\projects\uponor\DITA-OT1.5.1\demo\fo\build.xml.
[ant] Exiting C:\projects\uponor\DITA-OT1.5.1\demo\fo\build.xml.
[antcall] Exiting C:\projects\uponor\DITA-OT1.5.1\build.xml.

BUILD FAILED

Re: Error in transform after update to 12.1

Posted: Thu Jan 27, 2011 5:50 pm
by Radu
Hi Anders,

Each version of Oxygen comes with the latest Saxon version possible.
Oxygen 12.1 comes with Saxon 9.3.0.4.
The problem is that recently Michael Kay, the producer of Saxon removed support for some deprecated command line parameters for starting the transformation and DITA OT versions older than 1.5.2 are using in the PDF build.xml file the old way of specifying command line parameters which do not work anymore with the new Saxon in Oxygen.

So either:
1) You can make modifications to the:
C:\projects\uponor\DITA-OT1.5.1\frameworks\dita\DITA-OT\demo\fo\build.xml
For example compare it with the:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\demo\fo\build.xml

Modifications should be done in 3 places:

You should replace this property:

Code: Select all


 <property name="saxon.resolver.command.line" value="-w0 -x org.apache.xml.resolver.tools.ResolvingXMLReader -y org.apache.xml.resolver.tools.ResolvingXMLReader -r org.apache.xml.resolver.tools.CatalogResolver"/>
with this one:

Code: Select all


<property name="saxon.resolver.command.line" value="-warnings:silent -x:org.apache.xml.resolver.tools.ResolvingXMLReader -y:org.apache.xml.resolver.tools.ResolvingXMLReader -r:org.apache.xml.resolver.tools.CatalogResolver"/>
this argument:

Code: Select all


 <arg line='-o "${buildDir}/stage2.fo"'/>
with this one:

Code: Select all


<arg line='-o:"${buildDir}/stage2.fo"'/>
and this argument:

Code: Select all


<arg line='-o "${outputFile}"'/>
with this one:

Code: Select all


<arg line='-o:"${outputFile}"'/>
You can also send us the build file by email and I'll perform the modifications to it. The modified version will also work with older versions of Saxon.

2) Use the Saxon libraries from your custom DITA OT installation.
This would mean adding your Saxon libraries in the used transformation scenario libraries list as first entries in the list.

Regards,
Radu

Re: Error in transform after update to 12.1

Posted: Thu Jan 27, 2011 6:12 pm
by anderszvensson
Ok, thanks. I think I can manage the first option without problems. But about the second option, how exactly do I add the saxon libraries from my DITA OT (and I do use a separate DITA OT 1.5.1)?

Regards,

Anders

Re: Error in transform after update to 12.1

Posted: Thu Jan 27, 2011 6:45 pm
by Radu
Hi Anders,

You can edit the DITA Map transformation scenario and in the Advanced tab click the Libraries button.
Uncheck the Allow Oxygen... checkbox.

You should probably remove the:
${frameworks}/dita/DITA-OT/lib/dost-patches.jar
and
${frameworks}/dita/DITA-OT/lib/dost.jar
entries and add your own path to the dost.jar.

Then add your own entries pointing to the Saxon libraries and, very important, promote them to the top of the libraries list.
Oxygen has some patches which only work with the latest Saxon bundled with it so you need to prioritize your libraries.

Regards,
Radu

Re: Error in transform after update to 12.1

Posted: Thu Jan 27, 2011 6:59 pm
by anderszvensson
Ok, so add all the libraries in the saxon directory under my DITA OT?

Would option 1 or 2 be preferable in your opinion? I.e. by choosing to switch saxon version, do I lose any important functionality?

If I understand you correctly, an upgrade to DITA OT 1.5.2, even a separate custom DITA OT (for a future project), would make these modifications unncessary with Oxygen 12.1?

Regards,

Anders

Re: Error in transform after update to 12.1

Posted: Fri Jan 28, 2011 11:24 am
by Radu
Hi Anders,
anderszvensson wrote: Would option 1 or 2 be preferable in your opinion?
If you follow advice (1) the modified build.xml will also be backward compatible and work with older versions of Saxon 9.
anderszvensson wrote:I.e. by choosing to switch saxon version, do I lose any important functionality?
No, the DITA OT distribution downloaded from their web site comes with (and is tested with) the latest free version of Saxon 9.
Oxygen always includes the latest commercial version of Saxon 9.
anderszvensson wrote: If I understand you correctly, an upgrade to DITA OT 1.5.2, even a separate custom DITA OT (for a future project), would make these modifications unncessary with Oxygen 12.1?
Yes, I placed a bug about the deprecated parameters on the DITA OT bugs list and it was fixed in DITA OT 1.5.2 (the build file was modified according to what I proposed you).

Regards,
Radu

Re: Error in transform after update to 12.1

Posted: Fri Jan 28, 2011 1:40 pm
by anderszvensson
Thanks a lot for your help!

/Anders