DITA OpenToolkit 1.8:在mapref任务中构建演示失败(ClassGenException)

时间:2013-09-09 14:02:35

标签: dita

我下载了DITA OpenToolkit 1.8并尝试构建演示。

ant -f build_demo.xml

它一直运行到mapref任务,它会抛出错误,如下所示。 现在,错误表明错误,显然是错误的ICONST值。但如果之前没有人真正测试过这些样本,我会非常惊讶,因为无论你选择哪种输出格式都会出现错误,所以这很明显。

因此我在想,运行构建时可能缺少任何配置或参数吗?

mapref:
   [mapref] Transforming into C:\Dev\DITA-OT1.8\temp
   [mapref] Processing C:\Dev\DITA-OT1.8\temp\hierarchy.ditamap to C:\Dev\DITA-OT1.8\temp\hierarchy.ditamap.ref
   [mapref] Loading stylesheet C:\Dev\DITA-OT1.8\xsl\preprocess\mapref.xsl
   [mapref] com.sun.org.apache.bcel.internal.generic.ClassGenException: ICONST can be used only for value between -1 and 5: 7
   [mapref]     at com.sun.org.apache.bcel.internal.generic.ICONST.<init>(ICONST.java:81)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Step.translatePredicates(Step.java:419)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Step.translateStep(Step.java:243)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Step.translate(Step.java:233)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.AbsoluteLocationPath.translate(AbsoluteLocationPath.java:101)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.ApplyTemplates.translate(ApplyTemplates.java:174)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:513)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.compileResultTree(SyntaxTreeNode.java:671)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.VariableBase.translateValue(VariableBase.java:282)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Variable.translate(Variable.java:159)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:513)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Template.translate(Template.java:335)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.compile(TopLevelElement.java:64)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Template.compile(Template.java:44)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:549)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileTemplates(Mode.java:566)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:818)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:615)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java:730)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:354)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:429)
   [mapref]     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:795)
   [mapref]     at org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:300)
   [mapref]     at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:317)
   [mapref]     at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:178)
   [mapref]     at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:816)
   [mapref]     at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:406)
   [mapref]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [mapref]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [mapref]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [mapref]     at java.lang.reflect.Method.invoke(Method.java:597)
   [mapref]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [mapref]     at org.apache.tools.ant.Task.perform(Task.java:348)
   [mapref]     at org.apache.tools.ant.Target.execute(Target.java:435)
   [mapref]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
   [mapref]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
   [mapref]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   [mapref]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
   [mapref]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
   [mapref]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
   [mapref]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [mapref]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [mapref]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [mapref]     at java.lang.reflect.Method.invoke(Method.java:597)
   [mapref]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [mapref]     at org.apache.tools.ant.Task.perform(Task.java:348)
   [mapref]     at org.apache.tools.ant.Target.execute(Target.java:435)
   [mapref]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
   [mapref]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
   [mapref]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   [mapref]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
   [mapref]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
   [mapref]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
   [mapref]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [mapref]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [mapref]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [mapref]     at java.lang.reflect.Method.invoke(Method.java:597)
   [mapref]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [mapref]     at org.apache.tools.ant.Task.perform(Task.java:348)
   [mapref]     at org.apache.tools.ant.Target.execute(Target.java:435)
   [mapref]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
   [mapref]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
   [mapref]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
   [mapref]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   [mapref]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
   [mapref]     at org.apache.tools.ant.Main.runBuild(Main.java:851)
   [mapref]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
   [mapref]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   [mapref]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
   [mapref] : Error! ICONST can be used only for value between -1 and 5: 7
   [mapref] : Fatal Error! Die Formatvorlage konnte nicht kompiliert werden.
   [mapref] Failed to process null

1 个答案:

答案 0 :(得分:1)

我无法在Windows上重现此问题,至少。

您有double-checked your CLASSPATH还是尝试过使用Saxon而不是Xalan?我实际上认为DITA-OT放弃了对Xalan when all XSLT stylesheets were converted to XSLT 2.0的支持。

编辑:啊,我的坏。 XSLT 2.0提交不包含在1.8版本中。