Re: classloader error

Svata Dedic
 

Finally not in the office, so I can work on free projects ...

Apologies for the contextClassLoader() misleading hint; I don't know Xerces 2.11 peculiarities since we still use ancient 2.8.0 in NetBeans and for newer projects basic JAXP in JDK was sufficient ...

It seems that JMRI is missing xml-apis library JAR. Xerces started to implement ElementTraversal (https://www.w3.org/TR/ElementTraversal/) in its version 2.11.
Those classes were for some reason shipped with Jython 2.7.0; when it was replaced for Jython 2.7.1, which still contains some version of Xerces, but seems repackaged to org.python.*

When I added xml-apis.jar to JMRI's runtime classpath, it started on JDK8.

ElementTraversal API is part of JDK 9 and later, that's why it works on JDK11.

-Svata

Dne 18. 10. 19 v 17:03 Randall Wood via Groups.Io napsal(a):

I think I need to go through the set of Java 1.8 versions to see if some change in some release of Java 1.8 caused this. It appears (from reading release notes) that Java 1.8 > update 201 selects the XML parser differently than older updates than that.
I also thought the call in question was covered by a test, but I see it isn’t (because the load apps tests specify the profile to use) so that test needs to be added as well.
Randall
On Oct 18, 2019, at 09:47, Bob Jacobsen <@BobJacobsen> wrote:

That’s interesting.

Jenkins is running “compile on 11, run alltest on 8” successfully.

Would it make sense to try building a test release with Java 11 as an experiment?

Bob

On Oct 18, 2019, at 6:31 AM, Steve_G <RailRodder@...> wrote:

Randall, Pete
If I compile and run with 1.8 I get the error. Compile with 1.8, run under 11 no error.
Steve G..
--
Bob Jacobsen
@BobJacobsen





Join jmri@jmri-developers.groups.io to automatically receive all group messages.