I've pushed my current jdk11/pax exam experiments to this branch https://github.com/steinarb/scratch/tree/authservice/use-java-11
Freeman Fang's changes are in https://github.com/steinarb/scratch/tree/authservice/fix-jdk-11-pax-exam One thing I noticed with "mvn dependency:tree" was that the JDBC pax karaf feature org.ops4j.pax.jdbc:pax-jdbc-features:xml:features:1.3.1 pulled in both eclipse equinox and the felix OSGi framework: [INFO] +- org.ops4j.pax.jdbc:pax-jdbc-features:xml:features:1.3.1:compile [INFO] | +- org.apache.karaf.features:framework:kar:4.1.1:compile [INFO] | | +- org.apache.karaf.features:base:jar:4.1.1:runtime [INFO] | | +- org.apache.karaf:org.apache.karaf.main:jar:4.1.1:runtime [INFO] | | | +- org.apache.karaf:org.apache.karaf.util:jar:4.1.1:runtime [INFO] | | | | \- org.apache.felix:org.apache.felix.utils:jar:1.9.0:runtime [INFO] | | | +- net.java.dev.jna:jna:jar:4.3.0:runtime [INFO] | | | \- net.java.dev.jna:jna-platform:jar:4.3.0:runtime [INFO] | | +- org.apache.karaf:org.apache.karaf.exception:jar:4.1.1:runtime [INFO] | | +- org.apache.karaf.jaas:org.apache.karaf.jaas.boot:jar:4.1.1:runtime [INFO] | | +- org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.boot:jar:4.1.1:runtime [INFO] | | +- org.eclipse.tycho:org.eclipse.osgi:jar:3.11.2.v20161107-1947:runtime <-- eclipse OSGi [INFO] | | +- org.apache.felix:org.apache.felix.framework:jar:5.6.2:runtime <-- felix framework 5.6.2 [INFO] | | +- org.jline:jline:jar:3.2.0:compile [INFO] | | +- org.ops4j.pax.logging:pax-logging-api:jar:1.9.1:compile [INFO] | | +- org.ops4j.pax.logging:pax-logging-log4j2:jar:1.9.1:compile [INFO] | | +- org.apache.felix:org.apache.felix.fileinstall:jar:3.5.8:compile [INFO] | | +- org.apache.karaf.features:org.apache.karaf.features.extension:jar:4.1.1:compile [INFO] | | \- org.apache.karaf.features:org.apache.karaf.features.core:jar:4.1.1:compile So I suppressed both OSGi frameworks from the pax-jdbc-features dependency and tried first a new eclipse equinox version and then felix framework 6.0.3. Both gave me errors on framework initialization but the errors were different. When using eclipse equinox 3.13.0.v20180226-1711 I got the following stack trace (looks like it's getting the OSGi type definitions from a different bundle...?): Exception in thread "KarafEmbeddedRunner" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:96) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:86) Caused by: java.lang.SecurityException: class "org.osgi.service.log.LogLevel"'s signer information does not match signer information of other classes in the same package at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1150) at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:905) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1014) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.eclipse.osgi.internal.log.EquinoxLogServices.<init>(EquinoxLogServices.java:87) at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:65) 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) ... 5 more When using felix framework 6.0.3, I got the following stack trace: INFO: Installing and starting initial bundles Exception in thread "KarafEmbeddedRunner" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:96) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:86) Caused by: java.lang.RuntimeException: Error installing bundle listed in startup.properties with url: mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.5 and startlevel: 1 at org.apache.karaf.main.Main.installAndStartBundles(Main.java:530) at org.apache.karaf.main.Main.launch(Main.java:273) ... 5 more Caused by: org.osgi.framework.BundleException: Could not create bundle object. at org.apache.felix.framework.Felix.installBundle(Felix.java:3312) at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:147) at org.apache.karaf.main.Main.installAndStartBundles(Main.java:523) ... 6 more Caused by: java.lang.UnsupportedOperationException: Unable to add extension bundle. at org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:430) at org.apache.felix.framework.Felix.installBundle(Felix.java:3279) ... 8 more -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/86pnnfoylc.fsf%40dod.no. For more options, visit https://groups.google.com/d/optout.
