[ODLPARENT-168] SFT fails with JDK9 Created: 24/Sep/18  Updated: 28/Sep/18  Resolved: 28/Sep/18

Status: Resolved
Project: odlparent
Component/s: SFT
Affects Version/s: 4.0.0, 4.0.1
Fix Version/s: 3.1.4, 4.0.2

Type: Bug Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: java9
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It seems SFT is broken when running with JDK9: odlparent build fails on odl-javassist-3. The problem seems to be that the forked container exists really quickly, which causes the runner part to spin for three minutes on RMI lookup before giving up.



 Comments   
Comment by Robert Varga [ 24/Sep/18 ]

Some more data, surefire/2018-09-24T11-32-51_803.dumpstream

 

# Created at 2018-09-24T11:32:51.804
WARNING: An illegal reflective access operation has occurred

# Created at 2018-09-24T11:32:51.804
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/home/nite/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)

# Created at 2018-09-24T11:32:51.804
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector

# Created at 2018-09-24T11:32:51.805
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

# Created at 2018-09-24T11:32:51.805
WARNING: All illegal access operations will be denied in a future release

surefire/2018-09-24T11-32-50_476-jvmRun1.dumpstream

 

# Created at 2018-09-24T11:33:10.746
[SUREFIRE] std/in stream corrupted
java.io.IOException: Command NOOP unexpectedly read Void data with length 4.
        at org.apache.maven.surefire.booter.MasterProcessCommand.decode(MasterProcessCommand.java:130)
        at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:391)
        at java.base/java.lang.Thread.run(Thread.java:844)

 

 

 

Comment by Robert Varga [ 24/Sep/18 ]

Looking at karaf.log, it root cause seems to be:

Sep 24, 2018 12:02:19 PM org.apache.karaf.main.Main main
SEVERE: Could not launch framework
java.lang.RuntimeException: Error occurred while checking the system module.
        at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:311)
        at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:87)
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:68)
        at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
        at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
        at org.apache.karaf.main.Main.launch(Main.java:256)
        at org.apache.karaf.main.Main.main(Main.java:178)
Caused by: org.osgi.framework.BundleException: Invalid manifest header Export-Package: "org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.dto",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.osgi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.namespace;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi.dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.service.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apache.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",, org.apache.karaf.branding,sun.reflect,sun.reflect.misc,sun.misc,sun.nio.ch,com.sun.media.sound,sun.net,sun.security.x509"
        at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:353)
        at org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory.createBuilder(OSGiManifestBuilderFactory.java:85)
        at org.eclipse.osgi.storage.Storage.getBuilder(Storage.java:632)
        at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:263)
        ... 6 more
Comment by Robert Varga [ 24/Sep/18 ]

And trying to launch ./bin/karaf in pax results in:

nite@nitebug : ~/odl/odlparent/features/odl-javassist-3/target/pax/a7542297-9ec1-43dc-b05c-a1a0fadb20ef on  $ ./bin/karaf
Apache Karaf starting up. Press Enter to open the shell now...
Unable to register security provider: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
Error occurred while checking the system module.

Comment by Robert Varga [ 24/Sep/18 ]

This is an odlparent bug: we are supplying a bad jre.properties file, which means jre-9+ config-properties entry:

${jre-${java.specification.version}}

expands to an empty string, breaking things.

Generated at Wed Feb 07 20:27:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.