Page 1 of 1

Problem with WebHelp Responsive property file

Posted: Wed May 02, 2018 3:18 am
by rdelong
I have a webhelp.properties file that contains the following lines of code:

Code: Select all

# Specify the WebHelp template
webhelp.publishing.template=${dita.plugin.com.oxygenxml.webhelp.responsive.dir}\\templates\\sky

# Specifies if the sequence value will be used by default when the collection-type attribute is not specified.
webhelp.default.collection.type.sequence=yes

# Specifies if the breadcrumb component will be presented in the output.
webhelp.show.breadcrumb=yes

#Specifies if navigation links will be presented in the output.
webhelp.show.navigation.links=yes

# Oracle logo
webhelp.logo.image=${dita.plugin.com.oxygenxml.webhelp.responsive.dir}\\templates\\xyz\\variants\\tree\\sky\\resources\\portal_logo_landing_clear.png
I get the following error when I run the dita command:

Code: Select all

whr-init-custom-template:
Error: taskdef A class needed by class com.oxygenxml.publishing.template.PublisingTemplateTask cannot be found: javax/xml/bind/JAXBException
using the classloader AntClassLoader[C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\ant-contrib-1.0b3.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\log4j-1.2.14.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\lucene-analyzers-common-4.7.2.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\lucene-analyzers-kuromoji-4.7.2.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\lucene-core-4.7.2.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\oxygen-publishing-template.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\oxygen-webhelp-indexer.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\oxygen-webhelp-license.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\oxygen-webhelp-xerces-patches.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\xercesImpl-2.11.0.jar;C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\lib\xml-apis-1.4.01.jar]
I temporarily commened out the first line of my property file

Code: Select all

#webhelp.publishing.template=${dita.plugin.com.oxygenxml.webhelp.responsive.dir}\\templates\\sky
and the output is fine.

Any clues as to what might be causing this error?

Re: Problem with WebHelp Responsive property file

Posted: Wed May 02, 2018 4:38 pm
by radu_pisoi
Hi,

I suppose you are running using Java SE 9. In this case, it is a known issue because the JAXB API is considered to be Java EE API, and therefore it is no longer contained on the default classpath in Java SE 9.

You can see more details in the How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java stackoverflow thread:
https://stackoverflow.com/questions/435 ... ption-in-j

To fix this problem please follow the next procedure in the command line:
1. execute command:

Code: Select all

set ANT_OPTS=--add-modules java.xml.bind
2. execute WebHelp transformation

Code: Select all

dita --input=mapbook_my-bookmap.ditamap --output=..\out-non-build\my-bookmap-help --format=webhelp-responsive

Re: Problem with WebHelp Responsive property file

Posted: Wed May 02, 2018 6:39 pm
by rdelong
Thanks for the tip! I added the set ANT_OPTS=--add-modules java.xml.bind line and got me moving forward, but now I've encountered another issue. I'm not getting the following error:

Code: Select all

whr-init-custom-template:
[echo] Using custom WebHelp Responsive Template package: plugins\com.oxygenxml.webhelp.responsive\templates\sky
[templatetask] Template loader implementation timestamp: 29-09-2017 04:08:13
[templatetask] Loading WebHelp Responsive template from descriptor: C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\templates\sky\sky-tiles.opt
[templatetask] [WARN] JAXB validation event: [severity=FATAL_ERROR,message=cvc-complex-type.2.4.a: Invalid content was found starting with element 'tags'. One of '{preview-image, html-page-templates, resources, parameters, html-fragments, xslt}' is expected.,locator=[node=null,object=null,url=null,line=6,col=15,offset=-1]]
[templatetask] Cannot load template: C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\templates\sky\sky-tiles.opt
[templatetask] Please open the template descriptor in editor and correct the validation errors.
Error: Cannot load template: C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\templates\sky\sky-tiles.opt
I opened the ..\plugins\com.oxygenxml.webhelp.responsive\templates\sky\sky-tiles.opt in Oxygen 20 and it validates fine.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<publishing-template>
<name>Sky</name>

<webhelp>
<tags>
<tag type="layout">tiles</tag>
<tag type="color">blue</tag>
<tag type="color">light</tag>
</tags>
<preview-image file="sky-tiles.png"/>
<online-preview-url>https://www.oxygenxml.com/samples/DITA-WebHelp-Responsive/tiles/sky/</online-preview-url>
<!-- Resources like CSS, favicon, logo and others -->
<resources>
<!-- Main CSS file -->
<css file="sky.css"/>
<!-- Images -->
<fileset>
<include name="resources/**/*"/>
<exclude name="resources/**/*.svn"/>
<exclude name="resources/**/*.git"/>
</fileset>
</resources>

<parameters>
<parameter name="webhelp.show.main.page.tiles" value="yes"/>
<parameter name="webhelp.show.main.page.toc" value="no"/>
<parameter name="webhelp.top.menu.depth" value="3"/>
</parameters>
</webhelp>
</publishing-template>
I'm not sure what the problem is now.

Re: Problem with WebHelp Responsive property file

Posted: Thu May 03, 2018 2:46 am
by rdelong
Please disregard my earlier post. I was working with plugin resources from two different releases. I've reloaded my plugin with the content from the same release and now everything is running well.

However, now I'm running into a timeout issue with this error:

Code: Select all

whr-nav-links:
[xslt] Processing C:\_working\build\DITA-OT-2.5.2\out\en\webhelp-responsive\FS_Portal-test\toc.xml to C:\Users\mydocs\AppData\Local\Temp\temp20180502140040205\navlinks-dummy.html
[xslt] Loading stylesheet C:\_working\build\DITA-OT-2.5.2\plugins\com.oxygenxml.webhelp.responsive\xsl\navLinks\navLinks.xsl
[xslt] : Fatal Error! java.net.ConnectException: Connection timed out: connect Cause: java.net.ConnectException: Connection timed out: connect
[xslt] Failed to process C:\_working\build\DITA-OT-2.5.2\out\en\webhelp-responsive\FS_Portal-test\toc.xml
I'm running this job from my local computer, should I expect a timeout error? The book is quite large (1400+ items are in the ./temp folder.)

Re: Problem with WebHelp Responsive property file

Posted: Thu May 03, 2018 4:41 pm
by radu_pisoi
Hi,

Unfortunately the console log does not contain enough information to analyze this situation.

Could you send us a small DITA map sample on support@oxygenxml.com to reproduce the issue?