Page 1 of 1

Webhelp build fails on indexing

Posted: Wed Nov 23, 2016 11:51 pm
by bcspendlove
I just downloaded 18.1 2016102619 to try it out, and I get a failure when building webhelp. It's not clear to me that the indexertask error is what's causing the build fail, but there are no other error messages before it. I'm building a fairly long Docbook document. I don't see this error in version 18.0.
webhelp-index:
[echo] Indexing html files in /Users/benspendlove/xmlout/mobius-help/generic/2016.41, indexer language is: en
[indexertask] Cannot find scoring file: ./indexer/scoring.properties. Using flat scoring model.
[indexertask] Properies dir is null and scoring properties are not available in 'etc' in the java resources!

BUILD FAILED
/Applications/oxygen/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_common.xml:282: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
at ro.sync.exml.indexer.IndexerTask.execute(IndexerTask.java:211)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.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(DefaultExecutor.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)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.Analyzer
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more

Re: Webhelp build fails on indexing

Posted: Thu Nov 24, 2016 1:45 pm
by alin
Hello,

The WebHelp transformation uses the Apache Lucene library for implementing the search function. This library was updated in oXygen 18.1 and it is not compatible with older WebHelp distributions and this is the reason why the transformation fails.

The solution is to configure the transformation to use the Lucene libraries from Webhelp plugin and not the ones that come with oXygen application. To do this, you have to follow the next steps;

  1. Edit the transformation scenario associated with the transformation.
  2. Go to the Options tab and click the Libraries button.
  3. Press the Add button to insert the next entry: ${frameworks}/docbook/xsl/com.oxygenxml.webhelp/lib/lucene*.jar
  4. Move the previously added entry above the the ${oxygenHome}/lib/lucene*.jar entry;


If the WebHelp Plugin lib directory does not contain the the jar files for the Lucene library you will have to copy them from the from the oXygen 18.0 distribution.
So, open the {oXygen18InstallDir}\lib folder and copy the lucene-analyzers-common-4.0.0.jar, lucene-core-4.0.0.jar libraries to your current WebHelp Plugin lib folder.


Regards,
Alin

Re: Webhelp build fails on indexing

Posted: Mon Nov 28, 2016 11:42 pm
by bcspendlove
Okay, I've done that, copied the lucene jar files from 18.0 and added them to the transformation. I'm still getting a similar error, but now it complains that there's no Japanese analyzer. There's no Japanese to analyze.
webhelp-index:
[echo] Indexing html files in /Users/benspendlove/xmlout//generic/, indexer language is: en
[indexertask] Cannot find scoring file: ./indexer/scoring.properties. Using flat scoring model.
[indexertask] Properies dir is null and scoring properties are not available in 'etc' in the java resources!

BUILD FAILED
/Applications/oxygen/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_common.xml:282: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/ja/JapaneseAnalyzer
at ro.sync.exml.indexer.IndexerTask.execute(IndexerTask.java:211)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.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(DefaultExecutor.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)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.ja.JapaneseAnalyzer
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more

Re: Webhelp build fails on indexing

Posted: Tue Nov 29, 2016 6:03 pm
by alin
Hello,

The procedure should have worked. Can you please send us the entire content of the transformation console?
A small DocBook sample on which you can reproduce the problem would also help.
You can write us an email at support@oxygenxml.com.

Regards,
Alin

Re: Webhelp build fails on indexing

Posted: Wed Nov 30, 2016 1:44 am
by bcspendlove
Maybe I didn't do it right?

I found that the default transformation worked fine, so I made a copy of it and updated it with the parameters from my custom transformation scenario. And that new transformation scenario works fine. The output looks the same. :? The only thing that I can think is that maybe one of the default parameters that I hadn't changed was causing the problem.

Would it still be helpful to see the console output? Would you like me to send the scenario I was using?

Thanks.

Re: Webhelp build fails on indexing

Posted: Mon Dec 05, 2016 2:56 pm
by alin
Hello,

I am glad that you overcome the issue. There is no need for further investigations.

Regards,
Alin