I am trying an embedded Felix scenario. While loading a bundle from the embedded OSGi container (Apache Felix), I am getting the following error.
org.osgi.framework.BundleException: Unable to resolve test.bundle-attempt [50](R 50.0): missing requirement [test.bundle-attempt [50](R 50.0)] osgi.wiring.package; (osgi.wiring.package=com.sun.jdi.connect) Unresolved requirements: [[test.bundle-attempt [50](R 50.0)] osgi.wiring.package; (osgi.wiring.package=com.sun.jdi.connect)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:745)
With some trial and error, I have found that introducing javassist
causes the error.
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>
I am trying to embed the dependency.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-Activator>com.snc.TestPluginsActivator</Bundle-Activator>
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
<Export-Package>com.snc</Export-Package>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
Any suggestions on the reason why I am getting this error ?