An optional package import is “optional” meaning that it doesn’t need to be
wired by the OSGi framework for the bundle to resolve. If the package isn’t
wired then there will be no classes available from that package at runtime.
As I said previously. Optional packages require a lot of thought
Thanks Timothy. Removing resolution:optional solved the issue. But any
guess why resolution:optional was creating the issue.?
Hi Debra,
I note that there are a lot of optional package imports in the manifest
snippet that you’ve provided. Optional package imports require a lot of
careful
Hi Debra,
I note that there are a lot of optional package imports in the manifest snippet
that you’ve provided. Optional package imports require a lot of careful
management and are hard to get right. In this case it looks as though the
package import is declared as optional even though it
I am not able to make this work yet. Can some one suggest some thing what
could be going wrong?
On Wed, May 11, 2016 at 9:51 PM, Debraj Manna
wrote:
> Hi Jean,
>
> I am facing a similiar problem when I tried to use Afterburner from my toy
> application to an actual
Hi Jean,
I am facing a similiar problem when I tried to use Afterburner from my toy
application to an actual code base. In the same code base in one place it
is working perfectly fine and in one place it is failing with the
error java.lang.ClassNotFoundException:
When you use *, maven-bundle-plugin/bnd is checking the actual import in
your byte code. Here, you "really" import
com.fasterxml.jackson.module.afterburner, but the ser package is not in
your byte code, but transitively to the afterburner package. That's why
it's not imported by the wildcard
Thanks Jean. Updating the import as below in pom.xml solved the issue:-
com.fasterxml.jackson.module.afterburner.ser;resolution:=optional,*
Can you please let me know even though I specified * in the Import-Package
why com.fasterxml.jackson.module.afterburner.ser was not getting imported
even
It's not a Karaf issue ;)
As you can see in bundle:headers, the package
com.fasterxml.jackson.module.afterburner.ser is not imported, so not in
the classloader: that's the issue.
Just add com.fasterxml.jackson.module.afterburner.ser in the Import-Package.
Regards
JB
On 05/08/2016 09:21 AM,
I updated to the latest Jackson:-
karaf@root>bundle:list | grep jackson
124 | Active | 50 | 2.6.2 |
jackson-databind
239 | Active | 80 | 2.7.4 |
jackson-databind
karaf@root>bundle:list | grep Jackson
123 | Active | 50 | 2.6.2
Can you check with bundle:headers if it's correctly wired ?
Regards
JB
On 05/07/2016 07:14 PM, Debraj Manna wrote:
Below is the generated MANIFEST:-
Manifest-Version: 1.0
Bnd-LastModified: 1462615570323
Build-Jdk: 1.8.0_77
Built-By: debraj
Bundle-Activator: com.hello.world.HelloWorldActivator
Below is the generated MANIFEST:-
Manifest-Version: 1.0
Bnd-LastModified: 1462615570323
Build-Jdk: 1.8.0_77
Built-By: debraj
Bundle-Activator: com.hello.world.HelloWorldActivator
Bundle-ManifestVersion: 2
Bundle-Name: Hello World
Bundle-SymbolicName: world
Bundle-Version: 0.0.1
Created-By: Apache
Hi,
1. Can you check that the generated MANIFEST contains the afterburner
import ?
2. If you install afterburner bundle after your bundle, you have to
refresh your bundle as it's an optional import
Regards
JB
On 05/07/2016 05:27 PM, Debraj Manna wrote:
Hi,
I have a simple Hello World type
12 matches
Mail list logo