Build Failed! with external DITA-OT 2.0

<oXygen/> general issues.
caval
Posts: 25
Joined: Tue Jan 27, 2015 9:05 pm

Build Failed! with external DITA-OT 2.0

Post by caval » Tue Jan 27, 2015 9:17 pm

I am attempting to run a transform from Oxygen 16.1 using a custom PDF plugin. This process works successfully in OT v1.7 and v1.8 but I am having some trouble getting it working with OT v2.0.

These are the steps I’ve taken so far:
• moved custom build scripts into new OT
• moved custom PDF plugin into OT and integrated it
• created a new transform based on existing custom PDF transform, with all paths pointing to new OT
• added the newer OT v2.0 jars to the library tab in the transform

It gets as far as the preprocess stage but halts with the error shown below. Can you give me any indication of what might be causing this?

Code: Select all


preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\DITA_DIR\DOCS\src\TEST.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/DITA_DIR/DOCS/src/TEST.ditamap

BUILD FAILED
C:\DITA_DIR\DITA\DITA_OT_2_0\build.xml:338: The following error occurred while executing this line:
C:\\DITA_DIR\DITA\DITA_OT_2_0\DITA-OT\build.xml:40: The following error occurred while executing this line:
C:\\DITA_DIR\DITA\DITA_OT_2_0\DITA-OT\plugins\org.dita.base\build_preprocess.xml:79: Failed to run pipeline: [DOTX008E][ERROR] File 'file:/C:/C:/DITA_DIR/DOCS/src/TEST.ditamap' does not exist or cannot be loaded.

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Wed Jan 28, 2015 9:21 am

Hi,

Please try to post in a code block the entire console output received from the ANT process. For example, this particular error probably means there is another error higher in the log which caused the DITA Map not to be processed correctly.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Sun May 03, 2015 7:40 pm

I'm trying to do the same thing with the same Oxygen version, but get this error.

Executing:
"/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" -Xmx384m "-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration" -classpath "/Applications/oxygen/tools/ant/lib/ant-launcher.jar" "-Dant.home=/Applications/oxygen/tools/ant" org.apache.tools.ant.launch.Launcher -lib "/Applications/oxygen/classes" -lib "/Applications/oxygen/lib/oxygen.jar" -lib "/Applications/oxygen/lib/oxygenAuthor.jar" -lib "/Applications/oxygen/lib/oxygenDeveloper.jar" -lib "/Applications/oxygen/lib/oxygenEclipse.jar" -lib "/Applications/oxygen/lib/oxygenAuthorEclipse.jar" -lib "/Applications/oxygen/lib/oxygenDeveloperEclipse.jar" -lib "/Applications/oxygen/lib/resolver.jar" -lib "/Applications/oxygen/lib/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar" -lib "/Applications/oxygen/lib/xml-apis.jar" -lib "/Applications/oxygen/lib/xercesImpl.jar" -lib "/Applications/oxygen/lib/commons-io-1.3.1.jar" -lib "/Applications/oxygen/lib/commons-logging-1.1.3.jar" -lib "/Applications/oxygen/lib/log4j.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0/lib/commons-codec-1.4.jar" -lib "/Applications/oxygen/lib/jing.jar" -lib "/Applications/oxygen/lib/saxon9ee.jar" -lib "/Applications/oxygen/lib/saxon.jar" -lib "/Applications/oxygen/lib/xmlgraphics-commons-1.5.jar" -lib "/Applications/oxygen/lib/fop.jar" -lib "/Applications/oxygen/lib/batik-all-1.7.jar" -lib "/Applications/oxygen/lib/js.jar" -lib "/Applications/oxygen/lib/xml-apis-ext.jar" -lib "/Applications/oxygen/lib/avalon-framework-4.2.0.jar" -lib "/Applications/oxygen/lib/jeuclid-core.jar" -lib "/Applications/oxygen/lib/jeuclid-fop.jar" -lib "/Applications/oxygen/lib/jai_tiff.jar" -lib "/Applications/oxygen/lib/jh.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0/lib/jsearch.jar" -lib "/Applications/oxygen/lib/lucene-analyzers-common-4.0.0.jar" -lib "/Applications/oxygen/lib/lucene-core-4.0.0.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0/plugins/com.oxygenxml.webhelp/lib/xhtml-indexer.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0/plugins/com.oxygenxml.highlight/lib/xslthl-2.1.1.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0" -lib "/Users/xxx/Desktop/DITA-OT2.0/lib/dost-patches.jar" -lib "/Users/xxx/Desktop/DITA-OT2.0/lib" -lib "/Users/xxx/Desktop/DITA-OT2.0/lib/dost.jar" -f "/Users/xxx/Desktop/DITA-OT2.0/build.xml" "-Dtranstype=webhelp" "-Dbasedir=/Users/xxx/Desktop/simple_test" "-Doutput.dir=/Users/xxx/Desktop/simple_test/out/webhelp" "-Dwebhelp.trial.license=no" "-Dwebhelp.skin.css=/Applications/oxygen/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/predefined-skins/dita/oxygen/skin.css" "-Ddita.temp.dir=/Users/xxx/Desktop/simple_test/temp/webhelp" "-Dargs.hide.parent.link=no" "-Ddita.dir=/Users/xxx/Desktop/DITA-OT2.0" "-Dargs.xhtml.classattr=yes" "-Dargs.input=/Users/xxx/Desktop/simple_test/bookmap.ditamap" "-DbaseJVMArgLine=-Xmx384m"

Buildfile: /Users/xxx/Desktop/DITA-OT2.0/build.xml

BUILD FAILED
/Users/xxx/Desktop/DITA-OT2.0/build.xml:132: The following error occurred while executing this line:
/Users/xxx/Desktop/DITA-OT2.0/plugins/org.dita.base/build_init.xml:99: java.lang.UnsupportedClassVersionError: org/dita/dost/invoker/ExtensibleAntInvoker : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1393)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1072)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:579)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:237)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:169)
at org.apache.tools.ant.taskdefs.ImportTask.importResource(ImportTask.java:222)
at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:163)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:180)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
at org.apache.tools.ant.Main.runBuild(Main.java:826)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds

The process finished with exit code: 1

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Mon May 04, 2015 8:55 am

Hi,

The DITA Open Toolkit 2.0 developers decided to compile its Java extensions with Java 1.7. So you need at least Java 1.7 to run the publishing engine. By default Mac OSX comes with only Java 1.6 installed but you can also download and install Java 1.8 on it.
After this, if you edit the transformation scenario you are using in Oxygen, in the Advanced tab set the Java Home to point to the Java 1.8 installation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Mon Jun 01, 2015 5:56 pm

I'm also getting a BUILD FAILED! issue with DITA-OT 2.0 show a java.lang.NoSuchMethodError problem.

Any thoughts on how to fix this?

Code: Select all


[b]Here is the output:[/b]

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita
.bat
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

C:\Users\njmuck>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita
.bat
Buildfile: C:\OxygenWebHelp\DITA-OT2.0.1\build.xml

init:

check-arg:
[DOTA012W][WARN] Argument "dita.input.valfile" is deprecated. Please use the arg
ument "args.filter" instead.
[delete] Deleting directory C:\OxygenWebHelp\glossary\temp\webhelp
[mkdir] Created dir: C:\OxygenWebHelp\glossary\temp\webhelp

log-arg:
[echo] *****************************************************************
[echo] * basedir = C:\OxygenWebHelp\glossary
[echo] * dita.dir = C:\OxygenWebHelp\DITA-OT2.0.1
[echo] * transtype = webhelp
[echo] * tempdir = C:\OxygenWebHelp\glossary\temp\webhelp
[echo] * outputdir = C:\OxygenWebHelp\glossary\out\webhelp
[echo] * clean.temp = true
[echo] * DITA-OT version = 2.0.1
[echo] * XML parser = Xerces
[echo] * XSLT processor = Saxon
[echo] * collator = ICU
[echo] *****************************************************************
[echo] #Ant properties
[echo] #Mon Jun 01 07:51:55 PDT 2015
[echo] args.default.language=en-US
[echo] args.filter=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] args.grammar.cache=yes
[echo] args.hide.parent.link=no
[echo] args.input=C\:\\OxygenWebHelp\\glossary\\glossary.ditamap
[echo] args.logdir=C\:\\OxygenWebHelp\\glossary\\out\\webhelp
[echo] args.outext=.html
[echo] args.xhtml.classattr=yes
[echo] args.xml.systemid.set=yes
[echo] dita.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.input.valfile=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] dita.plugin.com.oxygenxml.dita-ot.plugin.webhelp.dir=C\:\\OxygenWebH
elp\\DITA-OT2.0.1\\plugins\\com.oxygenxml.webhelp
[echo] dita.plugin.com.oxygenxml.highlight.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\com.oxygenxml.highlight
[echo] dita.plugin.com.sophos.tocjs.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\com.sophos.tocjs
[echo] dita.plugin.org.dita.base.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.plugin.org.dita.docbook.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.docbook
[echo] dita.plugin.org.dita.eclipsecontent.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\org.dita.eclipsecontent
[echo] dita.plugin.org.dita.eclipsehelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.
1\\plugins\\org.dita.eclipsehelp
[echo] dita.plugin.org.dita.htmlhelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.htmlhelp
[echo] dita.plugin.org.dita.javahelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.javahelp
[echo] dita.plugin.org.dita.odt.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plugi
ns\\org.dita.odt
[echo] dita.plugin.org.dita.pdf2.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plug
ins\\org.dita.pdf2
[echo] dita.plugin.org.dita.specialization.dita11.dir=C\:\\OxygenWebHelp\\D
ITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
[echo] dita.plugin.org.dita.specialization.dita132.dir=C\:\\OxygenWebHelp\\
DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
[echo] dita.plugin.org.dita.specialization.eclipsemap.dir=C\:\\OxygenWebHel
p\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
[echo] dita.plugin.org.dita.troff.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.troff
[echo] dita.plugin.org.dita.wordrtf.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.wordrtf
[echo] dita.plugin.org.dita.xhtml.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.xhtml
[echo] dita.plugin.org.oasis-open.dita.v1_2.dir=C\:\\OxygenWebHelp\\DITA-OT
2.0.1\\plugins\\org.oasis-open.dita.v1_2
[echo] dita.temp.dir=C\:\\OxygenWebHelp\\glossary\\temp\\webhelp
[echo] *****************************************************************

build-init:

check-license:
[echo] Using directory C:\OxygenWebHelp\DITA-OT2.0.1/plugins/com.oxygenxml.
webhelp/lib
[java]
[java] Oxygen Webhelp version 17.0, build number 2015043018
[java]
[java] Oxygen Webhelp license valid, licensed to: Simon Bate, start date: O
ct 8, 2014, license version: 17

check-webhelp-feedback-parameters:

dita.map.webhelp.init:

preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\OxygenWebHelp\glossary\glossary.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary.ditamap
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary_references.dita

BUILD FAILED
C:\OxygenWebHelp\DITA-OT2.0.1\build.xml:41: The following error occurred while e
xecuting this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:78: jav
a.lang.NoSuchMethodError: org.dita.dost.util.StringUtils.join(Ljava/util/Collect
ion;Ljava/lang/String;)Ljava/lang/String;
at org.dita.dost.module.GenMapAndTopicListModule.addFlagImagesSetToPrope
rties(GenMapAndTopicListModule.java:1223)
at org.dita.dost.module.GenMapAndTopicListModule.outputResult(GenMapAndT
opicListModule.java:953)
at org.dita.dost.module.GenMapAndTopicListModule.execute(GenMapAndTopicL
istModule.java:242)
at org.dita.dost.pipeline.PipelineFacade.execute(PipelineFacade.java:68)

at org.dita.dost.invoker.ExtensibleAntInvoker.execute(ExtensibleAntInvok
er.java:193)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 3 seconds

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Tue Jun 02, 2015 9:54 am

Hi,

So you have a DITA OT 2.0 distribution in which you integrated the Oxygen XML WebHelp plugin, right?
Did you integrate the latest Oxygen XML WebHelp plugin (the one which was released along with Oxygen 17.0)? Because it is the only WebHelp plugin which should work with both DITA OT 1.8 and 2.0 (see step 5):

http://www.oxygenxml.com/doc/ug-oxygen/ ... ta-ot.html

Also if in the ANT libraries list you had a reference to a patches library like dost-patches-DITA-1.8.jar, please remove that reference from the path, the patch no longer works with the DITA OT 2.0 libraries.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Wed Jun 03, 2015 4:42 pm

Hi Radu,

Yes. I'm using the latest DITA-OT.

Here are the details:
- DITA-OT 2.0.1
- Oxygen Webhelp 17 build id: 2014102117 (with the plugin_2.xml file)
- JDK 1.8.0_45
- Saxon 9-1-0-8j

Looking through the error message,

the build.xml:47 issue is here at webhelp-index:

Code: Select all

<target name="output" 
depends="copy-html-pages,
copy-webhelp-resources,
annotate-all-html-files,
create-main-files,
webhelp-index"/>
the build_preprocess.xml:78 is here:

Code: Select all

<pipeline message="Generate list." taskname="gen-list" inputmap="${args.input}" tempdir="${dita.temp.dir}">
Any ideas?

Take care,
- Nick

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Wed Jun 03, 2015 4:55 pm

Hi Nick,

Have you tried to edit the dita.bat script we ship with the WebHelp plugin and remove from it the reference to the dost-patches-DITA-1.8.jar library?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Wed Jun 03, 2015 5:03 pm

Hi, again, Radu:

Here is the dita.bat file in the com.oxygen.webhelp plugin folder that I updated and with the environmental variable data and have been trying to run:

Code: Select all

@echo off

REM Oxygen Webhelp plugin
REM Copyright (c) 1998-2015 Syncro Soft SRL, Romania. All rights reserved.
REM Licensed under the terms stated in the license file EULA_Webhelp.txt
REM available in the base directory of this Oxygen Webhelp plugin.


REM The path of the Java Virtual Machine install directory
set JVM_INSTALL_DIR=C:\Program Files\Java\jdk1.8.0_45

REM The path of the DITA Open Toolkit install directory
set DITA_OT_INSTALL_DIR=C:\OxygenWebHelp\DITA-OT2.0.1

REM The path of the Saxon 9.1.0.8 install directory
set SAXON_9_DIR=C:\OxygenWebHelp\DITA-OT2.0.1\lib\saxonb9-1-0-8j

REM One of the following three values:
REM webhelp
REM webhelp-feedback
REM webhelp-mobile
set TRANSTYPE=webhelp

REM The path of the directory of the input DITA map file
set DITA_MAP_BASE_DIR=C:\OxygenWebHelp\glossary

REM The name of the input DITA map file
set DITAMAP_FILE=glossary.ditamap

REM The name of the DITAVAL input filter file
set DITAVAL_FILE=Filter.ditaval

REM The path of the directory of the DITAVAL input filter file
set DITAVAL_DIR=C:\OxygenWebHelp\glossary


REM IMPORTANT NOTE: If you use DITA-OT version 1.7.x you must replace
REM dost-patches-DITA-1.8.jar with dost-patches-DITA-1.7.jar in the following
REM java command.

"%JVM_INSTALL_DIR%\bin\java"^
-Xmx512m^
-classpath^
"%DITA_OT_INSTALL_DIR%\lib\ant-launcher.jar"^
"-Dant.home=%DITA_OT_INSTALL_DIR%\tools\ant" org.apache.tools.ant.launch.Launcher^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xercesImpl.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis-ext.jar"^
REM -lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\dost-patches-DITA-1.8.jar"^
-lib "%DITA_OT_INSTALL_DIR%"^
-lib "%DITA_OT_INSTALL_DIR%\lib"^
-lib "%SAXON_9_DIR%\saxon9.jar"^
-lib "%SAXON_9_DIR%\saxon9-dom.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\license.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\log4j.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\resolver.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\ant-contrib-1.0b3.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-analyzers-common-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-core-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xhtml-indexer.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\webhelpXsltExtensions.jar"^
-f "%DITA_OT_INSTALL_DIR%\build.xml"^
"-Dtranstype=%TRANSTYPE%"^
"-Dbasedir=%DITA_MAP_BASE_DIR%"^
"-Doutput.dir=%DITA_MAP_BASE_DIR%\out\%TRANSTYPE%"^
"-Ddita.temp.dir=%DITA_MAP_BASE_DIR%\temp\%TRANSTYPE%"^
"-Dargs.hide.parent.link=no"^
"-Dargs.filter=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.input.valfile=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.dir=%DITA_OT_INSTALL_DIR%"^
"-Dargs.xhtml.classattr=yes"^
"-Dargs.input=%DITA_MAP_BASE_DIR%\%DITAMAP_FILE%"^
"-Dwebhelp.skin.css=%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\predefined-skins\dita\oxygen\skin.css"^
"-DbaseJVMArgLine=-Xmx384m"
Thanks for your help.

Take care,
- Nick

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Thu Jun 04, 2015 10:38 am

Hi Nick,

Instead of adding REM before the line:

Code: Select all

REM -lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\dost-patches-DITA-1.8.jar"^
please try to remove it completely.
The command line a very long line which is split using ^ and but the Windows batch processor still interprets it as a single line so you cannot add REM inside a line.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Fri Jun 05, 2015 7:53 am

Hi Radu,

Thanks. Unfortunately, that opens up another problem.

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.


C:\>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita.bat
Buildfile: C:\OxygenWebHelp\DITA-OT2.0.1\build.xml

init:

check-arg:
[DOTA012W][WARN] Argument "dita.input.valfile" is deprecated. Please use the arg
ument "args.filter" instead.
[delete] Deleting directory C:\OxygenWebHelp\glossary\temp\webhelp
[mkdir] Created dir: C:\OxygenWebHelp\glossary\temp\webhelp

log-arg:
[echo] *****************************************************************
[echo] * basedir = C:\OxygenWebHelp\glossary
[echo] * dita.dir = C:\OxygenWebHelp\DITA-OT2.0.1
[echo] * transtype = webhelp
[echo] * tempdir = C:\OxygenWebHelp\glossary\temp\webhelp
[echo] * outputdir = C:\OxygenWebHelp\glossary\out\webhelp
[echo] * clean.temp = true
[echo] * DITA-OT version = 2.0.1
[echo] * XML parser = Xerces
[echo] * XSLT processor = Saxon
[echo] * collator = ICU
[echo] *****************************************************************
[echo] #Ant properties
[echo] #Thu Jun 04 21:37:19 PDT 2015
[echo] args.default.language=en-US
[echo] args.filter=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] args.grammar.cache=yes
[echo] args.hide.parent.link=no
[echo] args.input=C\:\\OxygenWebHelp\\glossary\\glossary.ditamap
[echo] args.logdir=C\:\\OxygenWebHelp\\glossary\\out\\webhelp
[echo] args.outext=.html
[echo] args.xhtml.classattr=yes
[echo] args.xml.systemid.set=yes
[echo] dita.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.input.valfile=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] dita.plugin.com.oxygenxml.dita-ot.plugin.webhelp.dir=C\:\\OxygenWebH
elp\\DITA-OT2.0.1\\plugins\\com.oxygenxml.webhelp
[echo] dita.plugin.com.oxygenxml.highlight.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\com.oxygenxml.highlight
[echo] dita.plugin.com.sophos.tocjs.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\com.sophos.tocjs
[echo] dita.plugin.org.dita.base.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.plugin.org.dita.docbook.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.docbook
[echo] dita.plugin.org.dita.eclipsecontent.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\org.dita.eclipsecontent
[echo] dita.plugin.org.dita.eclipsehelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.
1\\plugins\\org.dita.eclipsehelp
[echo] dita.plugin.org.dita.htmlhelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.htmlhelp
[echo] dita.plugin.org.dita.javahelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.javahelp
[echo] dita.plugin.org.dita.odt.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plugi
ns\\org.dita.odt
[echo] dita.plugin.org.dita.pdf2.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plug
ins\\org.dita.pdf2
[echo] dita.plugin.org.dita.specialization.dita11.dir=C\:\\OxygenWebHelp\\D
ITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
[echo] dita.plugin.org.dita.specialization.dita132.dir=C\:\\OxygenWebHelp\\
DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
[echo] dita.plugin.org.dita.specialization.eclipsemap.dir=C\:\\OxygenWebHel
p\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
[echo] dita.plugin.org.dita.troff.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.troff
[echo] dita.plugin.org.dita.wordrtf.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.wordrtf
[echo] dita.plugin.org.dita.xhtml.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.xhtml
[echo] dita.plugin.org.oasis-open.dita.v1_2.dir=C\:\\OxygenWebHelp\\DITA-OT
2.0.1\\plugins\\org.oasis-open.dita.v1_2
[echo] dita.temp.dir=C\:\\OxygenWebHelp\\glossary\\temp\\webhelp
[echo] *****************************************************************

build-init:

check-license:
[echo] Using directory C:\OxygenWebHelp\DITA-OT2.0.1/plugins/com.oxygenxml.
webhelp/lib
[java]
[java] Oxygen Webhelp version 17.0, build number 2015043018
[java]
[java] Oxygen Webhelp license valid, licensed to: Simon Bate, start date: O
ct 8, 2014, license version: 17

check-webhelp-feedback-parameters:

dita.map.webhelp.init:

preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\OxygenWebHelp\glossary\glossary.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary.ditamap
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary_references.dita
[gen-list] Serializing job specification

BUILD FAILED
C:\OxygenWebHelp\DITA-OT2.0.1\build.xml:41: The following error occurred while e
xecuting this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:95: The
following error occurred while executing this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_init.xml:133: java.lan
g.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory
for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathF
actoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException
: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider co
m.saxonica.config.EnterpriseXPathFactory could not be instantiated
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at org.apache.tools.ant.taskdefs.XSLTProcess.init(XSLTProcess.java:1232)

at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.
java:270)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:42
9)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 3 seconds

C:\>Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\njmuck>cd c:
C:\Users\njmuck

C:\Users\njmuck>cd..

C:\Users>cd..

C:\>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita.bat
Buildfile: C:\OxygenWebHelp\DITA-OT2.0.1\build.xml

init:

check-arg:
[DOTA012W][WARN] Argument "dita.input.valfile" is deprecated. Please use the arg
ument "args.filter" instead.
[delete] Deleting directory C:\OxygenWebHelp\glossary\temp\webhelp
[mkdir] Created dir: C:\OxygenWebHelp\glossary\temp\webhelp

log-arg:
[echo] *****************************************************************
[echo] * basedir = C:\OxygenWebHelp\glossary
[echo] * dita.dir = C:\OxygenWebHelp\DITA-OT2.0.1
[echo] * transtype = webhelp
[echo] * tempdir = C:\OxygenWebHelp\glossary\temp\webhelp
[echo] * outputdir = C:\OxygenWebHelp\glossary\out\webhelp
[echo] * clean.temp = true
[echo] * DITA-OT version = 2.0.1
[echo] * XML parser = Xerces
[echo] * XSLT processor = Saxon
[echo] * collator = ICU
[echo] *****************************************************************
[echo] #Ant properties
[echo] #Thu Jun 04 21:37:19 PDT 2015
[echo] args.default.language=en-US
[echo] args.filter=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] args.grammar.cache=yes
[echo] args.hide.parent.link=no
[echo] args.input=C\:\\OxygenWebHelp\\glossary\\glossary.ditamap
[echo] args.logdir=C\:\\OxygenWebHelp\\glossary\\out\\webhelp
[echo] args.outext=.html
[echo] args.xhtml.classattr=yes
[echo] args.xml.systemid.set=yes
[echo] dita.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.input.valfile=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] dita.plugin.com.oxygenxml.dita-ot.plugin.webhelp.dir=C\:\\OxygenWebH
elp\\DITA-OT2.0.1\\plugins\\com.oxygenxml.webhelp
[echo] dita.plugin.com.oxygenxml.highlight.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\com.oxygenxml.highlight
[echo] dita.plugin.com.sophos.tocjs.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\com.sophos.tocjs
[echo] dita.plugin.org.dita.base.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.plugin.org.dita.docbook.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.docbook
[echo] dita.plugin.org.dita.eclipsecontent.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\org.dita.eclipsecontent
[echo] dita.plugin.org.dita.eclipsehelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.
1\\plugins\\org.dita.eclipsehelp
[echo] dita.plugin.org.dita.htmlhelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.htmlhelp
[echo] dita.plugin.org.dita.javahelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.javahelp
[echo] dita.plugin.org.dita.odt.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plugi
ns\\org.dita.odt
[echo] dita.plugin.org.dita.pdf2.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plug
ins\\org.dita.pdf2
[echo] dita.plugin.org.dita.specialization.dita11.dir=C\:\\OxygenWebHelp\\D
ITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
[echo] dita.plugin.org.dita.specialization.dita132.dir=C\:\\OxygenWebHelp\\
DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
[echo] dita.plugin.org.dita.specialization.eclipsemap.dir=C\:\\OxygenWebHel
p\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
[echo] dita.plugin.org.dita.troff.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.troff
[echo] dita.plugin.org.dita.wordrtf.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.wordrtf
[echo] dita.plugin.org.dita.xhtml.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.xhtml
[echo] dita.plugin.org.oasis-open.dita.v1_2.dir=C\:\\OxygenWebHelp\\DITA-OT
2.0.1\\plugins\\org.oasis-open.dita.v1_2
[echo] dita.temp.dir=C\:\\OxygenWebHelp\\glossary\\temp\\webhelp
[echo] *****************************************************************

build-init:

check-license:
[echo] Using directory C:\OxygenWebHelp\DITA-OT2.0.1/plugins/com.oxygenxml.
webhelp/lib
[java]
[java] Oxygen Webhelp version 17.0, build number 2015043018
[java]
[java] Oxygen Webhelp license valid, licensed to: Simon Bate, start date: O
ct 8, 2014, license version: 17

check-webhelp-feedback-parameters:

dita.map.webhelp.init:

preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\OxygenWebHelp\glossary\glossary.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary.ditamap
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary_references.dita
[gen-list] Serializing job specification

BUILD FAILED
C:\OxygenWebHelp\DITA-OT2.0.1\build.xml:41: The following error occurred while e
xecuting this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:95: The
following error occurred while executing this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_init.xml:133: java.lan
g.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory
for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathF
actoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException
: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider co
m.saxonica.config.EnterpriseXPathFactory could not be instantiated
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at org.apache.tools.ant.taskdefs.XSLTProcess.init(XSLTProcess.java:1232)

at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.
java:270)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:42
9)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 3 seconds
Is it something related to the job-helper.xsl and Java v1.8.0_45?

Java 1.6 also throws an error. A major.minor version 51 error related to the ExtensibleAntInvoker.

Thanks for your help.

Take care,
- Nick

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Fri Jun 05, 2015 9:04 am

Hi Nick,

I think we are on the right track.

About this remark:
Java 1.6 also throws an error. A major.minor version 51 error related to the ExtensibleAntInvoker.
Despite my efforts to prevent that, the DITA Open Toolkit 2.0 main JAR library file was compiled with Java 1.7 compatibility:

https://github.com/dita-ot/dita-ot/issues/1633

So you need Java 1.7 or minimum to run the DITA Open Toolkit process.

About the error:

Code: Select all

C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_init.xml:133: java.lan
g.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory
for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathF
actoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException
: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider co
m.saxonica.config.EnterpriseXPathFactory could not be instantiated
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at org.apache.tools.ant.taskdefs.XSLTProcess.init(XSLTProcess.java:1232)

at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.
When run from inside Oxygen, the DITA Open Toolkit publishing works with the latest Saxon 9.6 commercial library (which can only be used from inside Oxygen).
But when you are running an external transformation you need to use the older Saxon 9.1 processor (the last free full-features Saxon 9 processor).
And all Saxon versions before Saxon 9.5 have a problem running with Java 1.8:

https://saxonica.plan.io/issues/1944#note-3

So you could try two things:

1) Use Java 1.7 to run the transformation (modify the JVM_INSTALL_DIR parameter in the dita.bat

2) If (1) does not work you could try to use Java 1.8 with the Saxon 9 libraries which come bundled with the DITA Open Toolkit 2.0 you downloaded (instead of the downloaded Saxon 9.1 libraries you are using now), which would mean the libraries:

Code: Select all

DITA-OT2.0.1\lib\saxon.jar
DITA-OT2.0.1\lib\saxon-dom.jar
because it's possible the saxon.jar which comes bundled with the DITA OT has a fix inside it to bypass this problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Fri Jun 05, 2015 10:08 am

Hi Radu,

Thanks for the ideas. It's still not working...

I tried the following variations to no success:
- Java 1.8, Saxon 9.1
- Java 1.8, Saxon 9
- Java 1.7, Saxon 9.1
- Java 1.7, Saxon 9

Here is the dita.bat file for Java 1.7 and Saxon 9.1:

Code: Select all

@echo off

REM Oxygen Webhelp plugin
REM Copyright (c) 1998-2015 Syncro Soft SRL, Romania. All rights reserved.
REM Licensed under the terms stated in the license file EULA_Webhelp.txt
REM available in the base directory of this Oxygen Webhelp plugin.


REM The path of the Java Virtual Machine install directory
set JVM_INSTALL_DIR=C:\Program Files\Java\jdk1.7.0_79

REM The path of the DITA Open Toolkit install directory
set DITA_OT_INSTALL_DIR=C:\OxygenWebHelp\DITA-OT2.0.1

REM The path of the Saxon 9.1.0.8 install directory
et SAXON_9_DIR=C:\OxygenWebHelp\DITA-OT2.0.1\lib\saxonb9-1-0-8j

REM One of the following three values:
REM webhelp
REM webhelp-feedback
REM webhelp-mobile
set TRANSTYPE=webhelp

REM The path of the directory of the input DITA map file
set DITA_MAP_BASE_DIR=C:\OxygenWebHelp\glossary

REM The name of the input DITA map file
set DITAMAP_FILE=glossary.ditamap

REM The name of the DITAVAL input filter file
set DITAVAL_FILE=Filter.ditaval

REM The path of the directory of the DITAVAL input filter file
set DITAVAL_DIR=C:\OxygenWebHelp\glossary


REM IMPORTANT NOTE: If you use DITA-OT version 1.7.x you must replace
REM dost-patches-DITA-1.8.jar with dost-patches-DITA-1.7.jar in the following
REM java command.

"%JVM_INSTALL_DIR%\bin\java"^
-Xmx512m^
-classpath^
"%DITA_OT_INSTALL_DIR%\lib\ant-launcher.jar"^
"-Dant.home=%DITA_OT_INSTALL_DIR%\tools\ant" org.apache.tools.ant.launch.Launcher^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xercesImpl.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis-ext.jar"^
-lib "%DITA_OT_INSTALL_DIR%"^
-lib "%DITA_OT_INSTALL_DIR%\lib"^
-lib "%SAXON_9_DIR%\saxon9.jar"^
-lib "%SAXON_9_DIR%\saxon9-dom.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\license.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\log4j.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\resolver.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\ant-contrib-1.0b3.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-analyzers-common-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-core-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xhtml-indexer.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\webhelpXsltExtensions.jar"^
-f "%DITA_OT_INSTALL_DIR%\build.xml"^
"-Dtranstype=%TRANSTYPE%"^
"-Dbasedir=%DITA_MAP_BASE_DIR%"^
"-Doutput.dir=%DITA_MAP_BASE_DIR%\out\%TRANSTYPE%"^
"-Ddita.temp.dir=%DITA_MAP_BASE_DIR%\temp\%TRANSTYPE%"^
"-Dargs.hide.parent.link=no"^
"-Dargs.filter=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.input.valfile=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.dir=%DITA_OT_INSTALL_DIR%"^
"-Dargs.xhtml.classattr=yes"^
"-Dargs.input=%DITA_MAP_BASE_DIR%\%DITAMAP_FILE%"^
"-Dwebhelp.skin.css=%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\predefined-skins\dita\oxygen\skin.css"^
"-DbaseJVMArgLine=-Xmx384m"
And here is the error message for Java 1.7 and Saxon 9.1:

Code: Select all

C:\>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita.bat
Buildfile: C:\OxygenWebHelp\DITA-OT2.0.1\build.xml

init:

check-arg:
[DOTA012W][WARN] Argument "dita.input.valfile" is deprecated. Please use the arg
ument "args.filter" instead.
[delete] Deleting directory C:\OxygenWebHelp\glossary\temp\webhelp
[mkdir] Created dir: C:\OxygenWebHelp\glossary\temp\webhelp

log-arg:
[echo] *****************************************************************
[echo] * basedir = C:\OxygenWebHelp\glossary
[echo] * dita.dir = C:\OxygenWebHelp\DITA-OT2.0.1
[echo] * transtype = webhelp
[echo] * tempdir = C:\OxygenWebHelp\glossary\temp\webhelp
[echo] * outputdir = C:\OxygenWebHelp\glossary\out\webhelp
[echo] * clean.temp = true
[echo] * DITA-OT version = 2.0.1
[echo] * XML parser = Xerces
[echo] * XSLT processor = Saxon
[echo] * collator = ICU
[echo] *****************************************************************
[echo] #Ant properties
[echo] #Thu Jun 04 23:53:41 PDT 2015
[echo] args.default.language=en-US
[echo] args.filter=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] args.grammar.cache=yes
[echo] args.hide.parent.link=no
[echo] args.input=C\:\\OxygenWebHelp\\glossary\\glossary.ditamap
[echo] args.logdir=C\:\\OxygenWebHelp\\glossary\\out\\webhelp
[echo] args.outext=.html
[echo] args.xhtml.classattr=yes
[echo] args.xml.systemid.set=yes
[echo] dita.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.input.valfile=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] dita.plugin.com.oxygenxml.dita-ot.plugin.webhelp.dir=C\:\\OxygenWebH
elp\\DITA-OT2.0.1\\plugins\\com.oxygenxml.webhelp
[echo] dita.plugin.com.oxygenxml.highlight.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\com.oxygenxml.highlight
[echo] dita.plugin.com.sophos.tocjs.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\com.sophos.tocjs
[echo] dita.plugin.org.dita.base.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.plugin.org.dita.docbook.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.docbook
[echo] dita.plugin.org.dita.eclipsecontent.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\org.dita.eclipsecontent
[echo] dita.plugin.org.dita.eclipsehelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.
1\\plugins\\org.dita.eclipsehelp
[echo] dita.plugin.org.dita.htmlhelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.htmlhelp
[echo] dita.plugin.org.dita.javahelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.javahelp
[echo] dita.plugin.org.dita.odt.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plugi
ns\\org.dita.odt
[echo] dita.plugin.org.dita.pdf2.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plug
ins\\org.dita.pdf2
[echo] dita.plugin.org.dita.specialization.dita11.dir=C\:\\OxygenWebHelp\\D
ITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
[echo] dita.plugin.org.dita.specialization.dita132.dir=C\:\\OxygenWebHelp\\
DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
[echo] dita.plugin.org.dita.specialization.eclipsemap.dir=C\:\\OxygenWebHel
p\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
[echo] dita.plugin.org.dita.troff.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.troff
[echo] dita.plugin.org.dita.wordrtf.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.wordrtf
[echo] dita.plugin.org.dita.xhtml.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.xhtml
[echo] dita.plugin.org.oasis-open.dita.v1_2.dir=C\:\\OxygenWebHelp\\DITA-OT
2.0.1\\plugins\\org.oasis-open.dita.v1_2
[echo] dita.temp.dir=C\:\\OxygenWebHelp\\glossary\\temp\\webhelp
[echo] *****************************************************************

build-init:

check-license:
[echo] Using directory C:\OxygenWebHelp\DITA-OT2.0.1/plugins/com.oxygenxml.
webhelp/lib
[java]
[java] Oxygen Webhelp version 17.0, build number 2015043018
[java]
[java] Oxygen Webhelp license valid, licensed to: SB, start date: O
ct 8, 2014, license version: 17

check-webhelp-feedback-parameters:

dita.map.webhelp.init:

preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\OxygenWebHelp\glossary\glossary.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary.ditamap
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary_references.dita
[gen-list] Serializing job specification

BUILD FAILED
C:\OxygenWebHelp\DITA-OT2.0.1\build.xml:41: The following error occurred while e
xecuting this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:95: The
following error occurred while executing this line:
java.lang.VerifyError: class com.saxonica.config.ProfessionalConfiguration overr
ides final method getTypeHierarchy.()Lnet/sf/saxon/type/TypeHierarchy;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
2)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
2)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
at java.lang.Class.getConstructor0(Class.java:2885)
at java.lang.Class.newInstance(Class.java:350)
at javax.xml.xpath.XPathFactoryFinder.loadFromService(XPathFactoryFinder
.java:406)
at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.jav
a:220)
at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java
:141)
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:182)
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:96)
at org.apache.tools.ant.taskdefs.XSLTProcess.init(XSLTProcess.java:1232)

at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.
java:270)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:42
9)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 2 seconds
Here is the dita.bat file configured for Java 1.8 and Saxon 9:

Code: Select all

@echo off

REM Oxygen Webhelp plugin
REM Copyright (c) 1998-2015 Syncro Soft SRL, Romania. All rights reserved.
REM Licensed under the terms stated in the license file EULA_Webhelp.txt
REM available in the base directory of this Oxygen Webhelp plugin.


REM The path of the Java Virtual Machine install directory
set JVM_INSTALL_DIR=C:\Program Files\Java\jdk1.8.0_45

REM The path of the DITA Open Toolkit install directory
set DITA_OT_INSTALL_DIR=C:\OxygenWebHelp\DITA-OT2.0.1

REM The path of the Saxon 9.1.0.8 install directory
set SAXON_9_DIR=C:\OxygenWebHelp\DITA-OT2.0.1\lib

REM One of the following three values:
REM webhelp
REM webhelp-feedback
REM webhelp-mobile
set TRANSTYPE=webhelp

REM The path of the directory of the input DITA map file
set DITA_MAP_BASE_DIR=C:\OxygenWebHelp\glossary

REM The name of the input DITA map file
set DITAMAP_FILE=glossary.ditamap

REM The name of the DITAVAL input filter file
set DITAVAL_FILE=Filter.ditaval

REM The path of the directory of the DITAVAL input filter file
set DITAVAL_DIR=C:\OxygenWebHelp\glossary


REM IMPORTANT NOTE: If you use DITA-OT version 1.7.x you must replace
REM dost-patches-DITA-1.8.jar with dost-patches-DITA-1.7.jar in the following
REM java command.

"%JVM_INSTALL_DIR%\bin\java"^
-Xmx512m^
-classpath^
"%DITA_OT_INSTALL_DIR%\lib\ant-launcher.jar"^
"-Dant.home=%DITA_OT_INSTALL_DIR%\tools\ant" org.apache.tools.ant.launch.Launcher^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xercesImpl.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis-ext.jar"^
-lib "%DITA_OT_INSTALL_DIR%"^
-lib "%DITA_OT_INSTALL_DIR%\lib"^
-lib "%SAXON_9_DIR%\saxon.jar"^
-lib "%SAXON_9_DIR%\saxon-dom.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\license.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\log4j.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\resolver.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\ant-contrib-1.0b3.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-analyzers-common-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-core-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xhtml-indexer.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\webhelpXsltExtensions.jar"^
-f "%DITA_OT_INSTALL_DIR%\build.xml"^
"-Dtranstype=%TRANSTYPE%"^
"-Dbasedir=%DITA_MAP_BASE_DIR%"^
"-Doutput.dir=%DITA_MAP_BASE_DIR%\out\%TRANSTYPE%"^
"-Ddita.temp.dir=%DITA_MAP_BASE_DIR%\temp\%TRANSTYPE%"^
"-Dargs.hide.parent.link=no"^
"-Dargs.filter=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.input.valfile=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.dir=%DITA_OT_INSTALL_DIR%"^
"-Dargs.xhtml.classattr=yes"^
"-Dargs.input=%DITA_MAP_BASE_DIR%\%DITAMAP_FILE%"^
"-Dwebhelp.skin.css=%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\predefined-skins\dita\oxygen\skin.css"^
"-DbaseJVMArgLine=-Xmx384m"
And here is the output error message for Java 1.8 and Saxon 9:

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:>C:\OxygenWebHelp\DITA-OT2.0.1\plugins\com.oxygenxml.webhelp\dita
.bat
Buildfile: C:\OxygenWebHelp\DITA-OT2.0.1\build.xml

init:

check-arg:
[DOTA012W][WARN] Argument "dita.input.valfile" is deprecated. Please use the arg
ument "args.filter" instead.
[delete] Deleting directory C:\OxygenWebHelp\glossary\temp\webhelp
[mkdir] Created dir: C:\OxygenWebHelp\glossary\temp\webhelp

log-arg:
[echo] *****************************************************************
[echo] * basedir = C:\OxygenWebHelp\glossary
[echo] * dita.dir = C:\OxygenWebHelp\DITA-OT2.0.1
[echo] * transtype = webhelp
[echo] * tempdir = C:\OxygenWebHelp\glossary\temp\webhelp
[echo] * outputdir = C:\OxygenWebHelp\glossary\out\webhelp
[echo] * clean.temp = true
[echo] * DITA-OT version = 2.0.1
[echo] * XML parser = Xerces
[echo] * XSLT processor = Saxon
[echo] * collator = ICU
[echo] *****************************************************************
[echo] #Ant properties
[echo] #Thu Jun 04 23:46:58 PDT 2015
[echo] args.default.language=en-US
[echo] args.filter=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] args.grammar.cache=yes
[echo] args.hide.parent.link=no
[echo] args.input=C\:\\OxygenWebHelp\\glossary\\glossary.ditamap
[echo] args.logdir=C\:\\OxygenWebHelp\\glossary\\out\\webhelp
[echo] args.outext=.html
[echo] args.xhtml.classattr=yes
[echo] args.xml.systemid.set=yes
[echo] dita.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.input.valfile=C\:\\OxygenWebHelp\\glossary\\Filter.ditaval
[echo] dita.plugin.com.oxygenxml.dita-ot.plugin.webhelp.dir=C\:\\OxygenWebH
elp\\DITA-OT2.0.1\\plugins\\com.oxygenxml.webhelp
[echo] dita.plugin.com.oxygenxml.highlight.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\com.oxygenxml.highlight
[echo] dita.plugin.com.sophos.tocjs.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\com.sophos.tocjs
[echo] dita.plugin.org.dita.base.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1
[echo] dita.plugin.org.dita.docbook.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.docbook
[echo] dita.plugin.org.dita.eclipsecontent.dir=C\:\\OxygenWebHelp\\DITA-OT2
.0.1\\plugins\\org.dita.eclipsecontent
[echo] dita.plugin.org.dita.eclipsehelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.
1\\plugins\\org.dita.eclipsehelp
[echo] dita.plugin.org.dita.htmlhelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.htmlhelp
[echo] dita.plugin.org.dita.javahelp.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\
plugins\\org.dita.javahelp
[echo] dita.plugin.org.dita.odt.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plugi
ns\\org.dita.odt
[echo] dita.plugin.org.dita.pdf2.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plug
ins\\org.dita.pdf2
[echo] dita.plugin.org.dita.specialization.dita11.dir=C\:\\OxygenWebHelp\\D
ITA-OT2.0.1\\plugins\\org.dita.specialization.dita11
[echo] dita.plugin.org.dita.specialization.dita132.dir=C\:\\OxygenWebHelp\\
DITA-OT2.0.1\\plugins\\org.dita.specialization.dita132
[echo] dita.plugin.org.dita.specialization.eclipsemap.dir=C\:\\OxygenWebHel
p\\DITA-OT2.0.1\\plugins\\org.dita.specialization.eclipsemap
[echo] dita.plugin.org.dita.troff.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.troff
[echo] dita.plugin.org.dita.wordrtf.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\p
lugins\\org.dita.wordrtf
[echo] dita.plugin.org.dita.xhtml.dir=C\:\\OxygenWebHelp\\DITA-OT2.0.1\\plu
gins\\org.dita.xhtml
[echo] dita.plugin.org.oasis-open.dita.v1_2.dir=C\:\\OxygenWebHelp\\DITA-OT
2.0.1\\plugins\\org.oasis-open.dita.v1_2
[echo] dita.temp.dir=C\:\\OxygenWebHelp\\glossary\\temp\\webhelp
[echo] *****************************************************************

build-init:

check-license:
[echo] Using directory C:\OxygenWebHelp\DITA-OT2.0.1/plugins/com.oxygenxml.
webhelp/lib
[java]
[java] Oxygen Webhelp version 17.0, build number 2015043018
[java]
[java] Oxygen Webhelp license valid, licensed to: SB, start date: O
ct 8, 2014, license version: 17

check-webhelp-feedback-parameters:

dita.map.webhelp.init:

preprocess.init:
[echo] *****************************************************************
[echo] * input = C:\OxygenWebHelp\glossary\glossary.ditamap
[echo] *****************************************************************

gen-list:
[gen-list] Using Xerces grammar pool for DTD and schema caching.
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary.ditamap
[gen-list] Processing file:/C:/OxygenWebHelp/glossary/glossary_references.dita
[gen-list] Serializing job specification

BUILD FAILED
C:\OxygenWebHelp\DITA-OT2.0.1\build.xml:41: The following error occurred while e
xecuting this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:95: The
following error occurred while executing this line:
C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_init.xml:133: java.lan
g.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory
for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathF
actoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException
: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider co
m.saxonica.config.EnterpriseXPathFactory could not be instantiated
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at org.apache.tools.ant.taskdefs.XSLTProcess.init(XSLTProcess.java:1232)

at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.
java:270)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:42
9)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 3 seconds
They get an error related to Saxonica.

Code: Select all

C:\OxygenWebHelp\DITA-OT2.0.1\plugins\org.dita.base\build_preprocess.xml:95: The
following error occurred while executing this line:
java.lang.VerifyError: class com.saxonica.config.ProfessionalConfiguration overr
ides final method getTypeHierarchy.()Lnet/sf/saxon/type/TypeHierarchy;
Thanks for providing this troubleshooting help.

Take care,
- Nick

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Fri Jun 05, 2015 12:14 pm

Hi Nick,

One problem I saw in one of your test runs was that in the dita.bat instead of:

Code: Select all

set SAXON_9_DIR=C:\OxygenWebHelp\DITA-OT2.0.1\lib\saxonb9-1-0-8j
you used:

Code: Select all

et SAXON_9_DIR=C:\OxygenWebHelp\DITA-OT2.0.1\lib\saxonb9-1-0-8j
which probably did not set the variable correctly.

Sorry for taking so long to resolve this, I'm also testing on my side and here's something which definitely works for me:

1) So I started with a DITA-OT2.0.1_standard_bin.zip kit and unpacked it.
2) Installed webhelp plugins, run the integrator in the DITA OT folder, added a license to the WebHelp plugin folder.
3) I use Java 1.8 and reduced the command line execution part from the dita.bat to a minimum of:

Code: Select all

    "%JVM_INSTALL_DIR%\bin\java"^
-Xmx512m^
-classpath^
"%DITA_OT_INSTALL_DIR%\lib\ant-launcher.jar"^
"-Dant.home=%DITA_OT_INSTALL_DIR%\tools\ant" org.apache.tools.ant.launch.Launcher^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xercesImpl.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xml-apis-ext.jar"^
-lib "%DITA_OT_INSTALL_DIR%"^
-lib "%DITA_OT_INSTALL_DIR%\lib"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\license.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\log4j.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\resolver.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\ant-contrib-1.0b3.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-analyzers-common-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\lucene-core-4.0.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\xhtml-indexer.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.0.jar"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\lib\webhelpXsltExtensions.jar"^
-f "%DITA_OT_INSTALL_DIR%\build.xml"^
"-Dtranstype=%TRANSTYPE%"^
"-Dbasedir=%DITA_MAP_BASE_DIR%"^
"-Doutput.dir=%DITA_MAP_BASE_DIR%\out\%TRANSTYPE%"^
"-Ddita.temp.dir=%DITA_MAP_BASE_DIR%\temp\%TRANSTYPE%"^
"-Dargs.hide.parent.link=no"^
"-Ddita.dir=%DITA_OT_INSTALL_DIR%"^
"-Dargs.xhtml.classattr=yes"^
"-Dargs.input=%DITA_MAP_BASE_DIR%\%DITAMAP_FILE%"^
"-Dwebhelp.skin.css=%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp\predefined-skins\dita\oxygen\skin.css"^
"-DbaseJVMArgLine=-Xmx384m"
so I did not even specify the path to the Saxon libraries anymore, I let the ANT build files of the DITA OT load those themselves from the DITA-OT2.0.1\lib folder.
And this worked for me.

So could you try to remove the folder C:\OxygenWebHelp\DITA-OT2.0.1\lib\saxonb9-1-0-8j completely and try with a command line similar to mine which relies on the fact that the DITA OT 2.0 ANT build files will try to load the Saxon libraries from its DITA-OT2.0.1\liblib folder anyway?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

urbanrobots
Posts: 84
Joined: Sun May 03, 2015 7:34 pm
Location: San Francisco

Re: Build Failed! with external DITA-OT 2.0

Post by urbanrobots » Fri Jun 05, 2015 9:46 pm

Hi Radu,

Great. Using the standard version of DITA-OT 2.1.0 M1 and the simplified command line execution part seemed to do the trick. The missing "s" was just a copy-paste issue.

I have a different issue with key references for topicrefs not resolving for files in different folders than the published ditamap, but that's another story and I'm happy just to have output!

Anyway, thanks!

Take care,
- Nick

Radu
Posts: 6508
Joined: Fri Jul 09, 2004 5:18 pm

Re: Build Failed! with external DITA-OT 2.0

Post by Radu » Mon Jun 08, 2015 8:55 am

Hi Nick,

Unfortunately that issue with references outside of the folder where the DITA Map is located is still present in the DITA Open Toolkit.
We have a topic for it in our user's manual:

http://www.oxygenxml.com/doc/ug-oxygen/ ... -refs.html

Unfortunately the second approach can only be done when invoking the publishing directly from Oxygen so it will not help with command line publishing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply