>>>>> Steinar Bang <sb-1rlz5cwd...@public.gmane.org>:

>>>>> Steinar Bang <sb-1rlz5cwdol8-xmd5yjdbdmrexy1tmh2...@public.gmane.org>:
>> Side note: I did not intentionally use the eclipse OSGi framework for
>> the pax exam test.

>> I pulled in the pax-exam-container-karaf which does not pull in an OSGi
>> framework, and then needed to make a reference to the pax jdbc karaf
>> feature, which *does* have a (unintentional?) maven transitive
>> dependency to the eclipse OSGi framework, and then things started
>> working, and I didn't investigate anymore.

> So I tried using the same osgi framework I'm using for regular karaf
> usage
[snip!]
> But I just got a similar stack trace, but with "felix" instead of "eclipse" 
> in the package names:

I noticed that the osgi.core version 6.0.0 artifact I have been using, was 
pretty old (July 2014):
 https://mvnrepository.com/artifact/org.osgi/org.osgi.core

So I looked for OSGi 7 and found this:
 https://mvnrepository.com/artifact/org.osgi/osgi.core

The version 6.0.0 osgi.core artifact is from January 2015.
The version 7.0.0 osgi.core artifact is from April 2018.

I've tried with both of them, but got the same stack trace (or very
similar stack trace) as the org.osgi.core 6.0.0 framework (the one below
is from osgi.core 7.0.0):
Jun 08, 2019 9:17:26 AM org.apache.karaf.main.Main launch
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:3078)
        at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
        at org.apache.karaf.main.Main.installAndStartBundles(Main.java:523)
        ... 6 more
Caused by: java.lang.UnsupportedOperationException: Unable to add extension 
bundle to FrameworkClassLoader - Maybe not an URLClassLoader?
        at 
org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:453)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:3044)
        ... 8 more

So this Java-11 change is possibly something that affects all OSGi 
frameworks...?

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/861s04h71p.fsf%40dod.no.
For more options, visit https://groups.google.com/d/optout.

Reply via email to