Page 1 of 1

Transformwation failed, NoClassDefFoundError for LogManager

Posted: Tue Jun 16, 2020 12:08 am
by rmcilvride
04DocBookWebHelp-TargetDB-forOXsupport.zip
Dear friends,

I recently installed v22.1, and in one of my WebHelp for Docbook transformation scenarios, in which I generate a target database, I got the following error:

Code: Select all

System ID: D:\Activity\Cogent\Docs\DocsOx\Source\TestSet\test-set.xml
Scenario: 04DocBookWebHelp-TargetDB
Build file: C:\Program Files\Oxygen XML Editor 22\frameworks\docbook\xsl\com.oxygenxml.webhelp.classic\build_docbook.xml
Engine name: ANT
Severity: fatal
Description: Transformation failed. C:\Program Files\Oxygen XML Editor 22\frameworks\docbook\xsl\com.oxygenxml.webhelp.classic\build_docbook.xml:518: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
After reverting my installation back to v22.0 I do not get that error. I have attached the transfomration scenario. Please let me know if you need anything else.

Best wishes,

Bob

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Tue Jun 16, 2020 11:16 am
by Radu
Hi Bob,

If you edit the transformation scenarios you are using, in the "Options" list you can click the "Libraries" button to see the list of libraries used for publishing. Please add an extra reference there looking like this:

Code: Select all

${oxygenHome}/lib/*log4j*.jar
Oxygen 22.1 updated its bundled logging libraries and they need to be properly referenced in the transformation scenario which was configured in an older Oxygen version.

Regards,
Radu

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Thu Jun 18, 2020 5:59 pm
by rmcilvride
Hi Radu,

Thank you for letting me know. Much appreciated. By the way, is there a place online where these kinds of things are documented for each release? I looked around a little for such a notice, and didn't see anything obvious.

Best regards,

Bob

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Fri Jun 19, 2020 7:36 am
by Radu
Hi Bob,

We announced in the released notes the update of the logging system but we should have taken more time and give more details about what could go wrong with various aspects, like for example older transformation scenarios like yours. The default transformation scenario "DocBook WebHelp Classic" which we bundle with Oxygen was updated to contain wildcards in the way in which it references to the logging libraries so in such cases when you experience problems running an older transformation scenario but our "DocBook WebHelp Classic" still works you can duplicate the "DocBook WebHelp Classic" scenario, look at its libraries list and compare it with yours.
Sorry for the inconvenience.

Regards,
Radu

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Fri Jun 19, 2020 10:37 pm
by rmcilvride
Hi Radu,

Yes, a heads-up would have been helpful. I didn't realize that there was any connection. I know it's hard to predict what could possibly go wrong with each user's configuration, but is there any kind of a change log that could be used to find out where to look? If not, I may be getting back in touch when we upgrade to v23. :-)

Kind regards,

Bob

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Mon Jun 22, 2020 6:39 am
by Radu
Hi Bob,

What we've been trying to do is to find all places in transformation scenarios where Java libraries are used and instead of referring to libraries using their exact names, modify the entries to use wildcards like ${oxygenHome}/lib/*log4j*.jar, this gives us flexibility to change the library version and still have transformation scenarios using these patterns still work. So if you compare the list of library references from your older transformation scenario with a list of libraries from our pre-defined transformation scenario and notice in some library references wildcards, you can also use wildcards in your scenarios and this will make them more flexible and increase their chances to work with future Oxygen versions.

Regards,
Radu

Re: Transformwation failed, NoClassDefFoundError for LogManager

Posted: Mon Jun 22, 2020 4:26 pm
by rmcilvride
Hi Radu,

Thank you for this explanation. It makes sense, and I'm glad to know that Oxygen is becoming increasingly robust. I will follow your suggestion, and will let you know if I run into any problems.

Best regards,

Bob