Page 1 of 1

Compatibility with OpenJDK 1.8

Posted: Tue Mar 26, 2019 1:01 pm
by Isabelle
Hello,

As you must know, Oracle has announced that the Oracle JDK 8 builds released after Jan 2019 cease to be free for commercial use.
Currently, we use oxygen-18.1.0.0.jar, and we intend to use OpenJDK 1.8 to replace OracleJDK 1.8.
We would like to know if there are any incompatibilities with Oxygen 18.1 and OpenJDK 1.8.

I already make some tests with <oXygen/> XML Author 1.8 by replacing your embedded jre with the OpenJDK 1.8 jre downloaded here => https://developers.redhat.com/products/ ... /download/.
The first problem I saw was a problem of displaying images; CGM, PNG and JPG was not displayed.
Is it a known problem ? Is it the only one ?

Currently you provide your own JRE with your tools <oXygen/> XML Editor, <oXygen/> XML Author, ...
In the future, will you continue to provide this Oracle JRE or another like OpenJDK JRE ?

Regards,
Isabelle

Re: Compatibility with OpenJDK 1.8

Posted: Tue Mar 26, 2019 4:13 pm
by Radu
Hi Isabelle,

Probably Oxygen 21.1 (summer this year) will be fully compatible with Oracle Open JDK 11. But we have not tested Oxygen (neither 21 nor 18.1) against Open JDK 1.8 so it may or may not work, our interest is to move to Open JDK 11.

About this problem:
The first problem I saw was a problem of displaying images; CGM, PNG and JPG was not displayed.
When you hover over those images does the tooltip give you some details about why the images are not displayed? Maybe Open JDK does not come bundled with certain libraries which could be installed separately.

Regards,
Radu

Re: Compatibility with OpenJDK 1.8

Posted: Tue Mar 26, 2019 4:33 pm
by Isabelle
Radu,

Thank you for your answer.

Regarding my problem, here is the error message displayed :

Code: Select all

Could not load image: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
Regards,
Isabelle

Re: Compatibility with OpenJDK 1.8

Posted: Wed Mar 27, 2019 9:09 am
by Radu
Hi Isabelle,

I tested running the entire Oxygen XML Editor using Oracle Open JDK and I cannot reproduce the problem with the images not being shown.
This looks like a class loading problem, somehow the Xerces XML parser libraries seem to be loaded from two different JAR libraries.
Our Author Component comes with its own Xerces libraries. Do you also provide your own? Because if you do, this might be the cause of the problem. Do you use a separate Java class loader to load and use the Author Component libraries? Because using such a separate class loader might be a solution for cases when the application has conflicting JAR libraries.

Can you enable full logging in the component? Maybe calling early in your code:

Code: Select all

org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);
I'm interested if we can get the entire stack trace of the exception.

Regards,
Radu

Re: Compatibility with OpenJDK 1.8

Posted: Wed Mar 27, 2019 12:00 pm
by Isabelle
Hi Radu,

The OpenJDK I used for my test is not from Oracle but from RedHat in version 1.8 (see the download link).
And I ran the test on your Author XML editor and not with my code.
So I can not debug this error, sorry.

Regards,
Isabelle

Re: Compatibility with OpenJDK 1.8

Posted: Wed Mar 27, 2019 2:47 pm
by Radu
Hi Isabelle,

Oh, it's easier this way.
Create a file called "log4j.properties" with the content:

Code: Select all

log4j.rootCategory= debug, R2
log4j.appender.R2=org.apache.log4j.RollingFileAppender
log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
log4j.appender.R2.MaxFileSize=12000KB
log4j.appender.R2.MaxBackupIndex=20
log4j.appender.R2.layout=org.apache.log4j.PatternLayout
log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n

# CLIENT FOR V3
log4j.category.org.apache.commons.httpclient=error
log4j.category.httpclient.wire=debug
log4j.category.ro.sync.net.protocol=debug
# CLIENT FOR V4
log4j.category.org.apache.http.impl.conn=debug
log4j.category.org.apache.http.impl.client=debug
log4j.category.org.apache.http.client=debug
log4j.category.org.apache.http.wire=debug
log4j.category.org.apache.http=debug
and place it in the Oxygen installation folder. Then start Oxygen, reproduce the problem and on your Desktop there should be an "oxygenLog" folder. Among lots of other logging information it should probably contain a stack trace of that exception.
You should also try to look for some kind of library named something like "*xerces*" in your JRE's installation folder, maybe the RedHat OpenJDK distribution comes with its own separate Xerces library which interferes with ours.
But what is your main goal? Make the component work on RedHat Linux? Or make it work on another operating system?

Regards,
Radu

Re: Compatibility with OpenJDK 1.8

Posted: Wed Mar 27, 2019 6:06 pm
by Isabelle
Radu,

Here is the stack trace :

Code: Select all

DEBUG [ AWT-EventQueue-0 ] ro.sync.ecss.i.gc - java.io.IOException: Could not load image: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
java.io.IOException: Could not load image: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
at ro.sync.ecss.images.m.m(Unknown Source)
at ro.sync.ecss.images.m.e(Unknown Source)
at ro.sync.ecss.images.c.ddk(Unknown Source)
at ro.sync.ecss.i.gc.rg(Unknown Source)
at ro.sync.ecss.i.gc.og(Unknown Source)
at ro.sync.ecss.i.gc.<init>(Unknown Source)
at ro.sync.ecss.i.gc.<init>(Unknown Source)
at ro.sync.ecss.i.jb.y(Unknown Source)
at ro.sync.ecss.i.b.ag(Unknown Source)
at ro.sync.ecss.i.b.<init>(Unknown Source)
at ro.sync.ecss.i.f.em(Unknown Source)
at ro.sync.ecss.i.f.am(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.li(Unknown Source)
at ro.sync.ecss.i.sb.li(Unknown Source)
at ro.sync.ecss.component.o.relayout(Unknown Source)
at ro.sync.ecss.component.o.invalidateBox(Unknown Source)
at ro.sync.ecss.component.o.kjk(Unknown Source)
at ro.sync.exml.workspace.b.e.b.b.c.refresh(Unknown Source)
at com._4dconcept.adam.author.framework.S1000D.style.ADAMStylesFilter.getImageContent(ADAMStylesFilter.java:457)
at com._4dconcept.adam.author.framework.S1000D.style.ADAMStylesFilter.filter(ADAMStylesFilter.java:229)
at ro.sync.ecss.css.z.bf(Unknown Source)
at ro.sync.ecss.css.z.n(Unknown Source)
at ro.sync.ecss.dom.t.h(Unknown Source)
at ro.sync.ecss.dom.t.e(Unknown Source)
at ro.sync.ecss.dom.t.i(Unknown Source)
at ro.sync.ecss.dom.t.d(Unknown Source)
at ro.sync.ecss.dom.t.k(Unknown Source)
at ro.sync.ecss.i.f.am(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.fm(Unknown Source)
at ro.sync.ecss.i.f.li(Unknown Source)
at ro.sync.ecss.i.sb.li(Unknown Source)
at ro.sync.ecss.component.o.relayout(Unknown Source)
at ro.sync.ecss.component.o.recomputeLayout(Unknown Source)
at ro.sync.ecss.component.ac$1.c(Unknown Source)
at ro.sync.ecss.component.b.d(Unknown Source)
at ro.sync.ecss.component.ac$5.stateChanged(Unknown Source)
at javax.swing.JViewport.fireStateChanged(JViewport.java:1369)
at javax.swing.JViewport.reshape(JViewport.java:839)
at java.awt.Component.setBounds(Component.java:2261)
at java.awt.Component.setBounds(Component.java:2405)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:890)
at java.awt.Container.layout(Container.java:1513)
at java.awt.Container.doLayout(Container.java:1502)
at java.awt.Container.validateTree(Container.java:1698)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validateTree(Container.java:1707)
at java.awt.Container.validate(Container.java:1633)
at java.awt.Container.validateUnconditionally(Container.java:1670)
at java.awt.Window.show(Window.java:1033)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at ro.sync.ui.application.ad.setVisible(Unknown Source)
at ro.sync.ui.application.b.setVisible(Unknown Source)
at ro.sync.exml.MainFrame.setVisible(Unknown Source)
at ro.sync.ui.application.ApplicationLauncher$5.run(Unknown Source)
at ro.sync.ui.m$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at ro.sync.ui.application.ApplicationDialog.ejb(Unknown Source)
at ro.sync.ui.application.ApplicationDialog.setVisible(Unknown Source)
at ro.sync.ui.application.xb.alb(Unknown Source)
at ro.sync.ui.application.xb$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at ro.sync.util.security.f.n(Unknown Source)
at ro.sync.ui.application.xb.setVisible(Unknown Source)
at ro.sync.ui.application.xb$9.run(Unknown Source)
at ro.sync.ui.m$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: org.apache.xerces.impl.dv.DVFactoryException: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)
at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.<init>(Unknown Source)
at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.<init>(Unknown Source)
at ro.sync.xml.parser.t.<init>(Unknown Source)
at org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration.<init>(Unknown Source)
at org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration.<init>(Unknown Source)
at ro.sync.xml.parser.ParserCreator.newXmlParserConfiguration(Unknown Source)
at ro.sync.xml.parser.ParserCreator.newXmlParserConfiguration(Unknown Source)
at ro.sync.xml.parser.ParserCreator.newXmlParserConfiguration(Unknown Source)
at ro.sync.xml.parser.ParserCreator.f(Unknown Source)
at ro.sync.xml.parser.ParserCreator.d(Unknown Source)
at ro.sync.xml.parser.ParserCreator.newXRNoValid(Unknown Source)
at ro.sync.xml.parser.ParserCreator.newXRNoValid(Unknown Source)
at ro.sync.ecss.images.ImageHandlerDispatcher.getSpecialImageHandler(Unknown Source)
at ro.sync.ecss.images.m.b(Unknown Source)
at ro.sync.ecss.images.m.q(Unknown Source)
at ro.sync.ecss.images.g.l(Unknown Source)
... 151 more
I have checked in my JRE's installation folder and I did not find any kind of library named like "*xerces*".

Or goal is to check if it is possible to launch oxygen 18.1 with an other JRE 1.8 than OracleJRE 1.8 on Windows.
We choose RedHat JRE for Windows for our tests, but it is not necessary the one we are going to choose.

Regards,
Isabelle

Re: Compatibility with OpenJDK 1.8

Posted: Thu Mar 28, 2019 10:00 am
by Radu
Hi Isabelle,

Running XML Author 18.1 (but I also tried with 21) with the RedHat JRE without any extra plugin or framework installed, I open for example a DITA sample file OXYGEN_INSTALL_DIR\dita\flowers\topics\flowers\lilac.dita and I cannot reproduce the problem.

Looking at the stack trace of the exception you posted, it also passes through your code:

Code: Select all

at ro.sync.exml.workspace.b.e.b.b.c.refresh(Unknown Source)
at com._4dconcept.adam.author.framework.S1000D.style.ADAMStylesFilter.getImageContent(ADAMStylesFilter.java:457)
at com._4dconcept.adam.author.framework.S1000D.style.ADAMStylesFilter.filter(ADAMStylesFilter.java:229)
at ro.sync.ecss.css.z.bf(Unknown Source)
Does your framework configuration add extra libraries in its Classpath list?
Can you try to comment out your code which does the call to the refresh() API? Just to see if the image display problem still persists.
In general it's a bad idea to refresh nodes directly on a styles filter, as the refresh will trigger back events to the styles filter. If you use SwingUtilities.invokeLater to delay the refresh does not problem still persist?

Regards,
Radu