>>>>> Steinar Bang <[email protected]>:
> 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
<dependency>
<groupId>org.ops4j.pax.jdbc</groupId>
<artifactId>pax-jdbc-features</artifactId>
<version>${pax.jdbc.version}</version>
<type>xml</type>
<classifier>features</classifier>
<exclusions>
<exclusion>
<groupId>org.apache.karaf</groupId>
<artifactId>org.apache.karaf.client</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
But I just got a similar stack trace, but with "felix" instead of "eclipse" in
the package names:
Jun 08, 2019 8:57:10 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
--
--
------------------
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/865zpgh87m.fsf%40dod.no.
For more options, visit https://groups.google.com/d/optout.