karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduard Vodicka <eduard.vodi...@eforce21.com>
Subject Fragment-Bundle to pax-logging not getting resolved
Date Mon, 06 Nov 2017 12:08:09 GMT
Hey guys,

i have stumbled upon some strage behaviour in the recent Karaf versions
(4.1.2 and 4.1.3). However, it was working in Karaf 4.1.1

What I am trying to accomplish:
I want to use a custom log42 Log Layout, so I am creating an extension
bundle for the pax-logging bundle. I created a sample project stripped down
of all logic to demonstrate my problem:
https://github.com/evodicka/pax-logging-test
This does nothing more than create a bundle, that is a fragment to
org.ops4j.pax.logging.pax-logging-log4j2
The observed behaviour is the same as in my real bundle.

The problem:
When I drop this bundle to Karaf's deploy folder, everything works as
expected. It gets resolved and is marked as a fragment bundle. When I now
restart Karaf, the bundle remains in state Installed. It works again when I
delete the bundle cache.
The logs show no indication that something went wrong when resolving the
bundle.

I tried creating a feature.xml with this bundle (also in the github
project). When I add this to the boot features of Karaf, it does not start
up and shows the following exception:

2017-11-06T11:43:57,683 | INFO  | features-1-thread-1 | FeaturesServiceImpl
             | 9 - org.apache.karaf.features.core - 4.1.3 |   null
2017-11-06T11:43:57,686 | ERROR | FelixStartLevel  | BootFeaturesInstaller
           | 9 - org.apache.karaf.features.core - 4.1.3 | Error installing
boot features
java.lang.IllegalStateException: Resource has no uri
at
org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1457)
~[?:?]
at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:763)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]



The fragment mechanism seems to be working in general, because I can attach
this bundle as a fragment to one of my other bundles and it works without a
flaw.

Maybe you could point me in a direction where I am missing something
important?

Thanks and best Regards,
Eduard

Mime
View raw message