You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2015/09/07 01:48:05 UTC

Combining DS and blueprint in a karaf assembly yields -- chaos?

I have a working version of my stuff that entirely uses blueprint.

My assembly lists a set of boot features:

 <feature>aries-blueprint</feature>
    <feature>bundle</feature>
    <feature>config</feature>
    <feature>diagnostic</feature>
    <feature>feature</feature>
    <feature>jaas</feature>
    <feature>shell</feature>
    <feature>log</feature>
    <feature>management</feature>
    <feature>package</feature>
    <feature>shell-compat</feature>
    <feature>ssh</feature>
    <feature>system</feature>
    <feature>wrap</feature>
    <feature>jolokia</feature>
    <feature>war</feature>
    <feature>cxf-jaxrs</feature>
    <feature>rosette-api</feature>
    <feature>rosapi-common</feature>
    <feature>rosapi-front-end-null-request-tracker</feature>
    <feature>rosapi-front-end-anvils-transport</feature>
    <feature>rosapi-front-end-service</feature>
    <feature>rosapi-worker-service</feature>
    <feature>rosapi-worker-dummy-sdk</feature>
</bootFeatures>

I want to add one component that uses DS, so I added
<feature>scr</feature> into the list.

When I start the assembled assembly, I get:

As you will see at the bottom, the resulting environment is quite sad;
it has no log commands.



karaf@root>org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
: Error installing boot features
org.apache.karaf.features.internal.util.MultiException: Error restarting bundles
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
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)
Suppressed: org.osgi.framework.BundleException: Activator start error
in bundle org.ops4j.pax.url.wrap [149].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
... 6 more
Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
at java.net.URL.toExternalForm(URL.java:922)
at java.net.URL.toString(URL.java:908)
at java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
... 11 more
org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
: Error installing boot features
java.lang.NullPointerException
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
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)
log:display
Command not found: log:display

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Oh ... and use the scr feature it's known to work with Karaf.

regards, Achim

2015-09-07 15:26 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:

> As I already said in the other thread,
> make sure you don't provide the compendium jar it'll colide with a bunch
> of other jars already providing the
> needed packages ...
>
> regards, Achim
>
>
> 2015-09-07 15:09 GMT+02:00 Benson Margulies <be...@basistech.com>:
>
>> On Mon, Sep 7, 2015 at 8:48 AM, Achim Nierbeck <bc...@googlemail.com>
>> wrote:
>> > If installing the scr feature triggers to refresh the cxf feature, it
>> must
>> > be one of the scr bundles contained.
>> > Most likely a <bundle dependency="true"> .... might be able to sole
>> that for
>> > the scr feature.
>>
>> Achim, did you mean my feature that uses DS or the stock Karaf 'scr'
>> feature?
>>
>> feature:install scr
>>
>> runs without a squeak.
>>
>> Installing my relatively tiny feature that has DS metadata is the
>> trigger, and the trouble happens even when CXF and SCR are all
>> installed before it.
>>
>> If I compare the version of this feature that works fine (with
>> blueprint) with the version that does not (with DS), the only
>> difference is the addition of:
>>
>> <bundle start-level="75">mvn:org.osgi/org.osgi.compendium/5.0.0</bundle>
>>
>> Plus there's the DS metadata in the bundle that wasn't there before.
>>
>> Just installing CXF does not even install the compendium bundle, so
>> don't see what the dependency issue could be.
>>
>> However .... I think I may be messing up something basic that could be
>> contributing to this.
>>
>> Maven project A builds a bundle, and then a feature consisting of the
>> bundle and its dependencies.
>>
>> Maven project B builds a project that depends on A, and a feature
>> consisting of the B bundle and its dependencies -- which include all
>> the A dependencies.
>>
>> Using the karaf tooling, is there something I'm supposed to do so that
>> the B feature has a _feature_ dependency on the A feature instead of
>> repeating all those bundles?
>>
>> --benson
>>
>> >
>> > regards, Achim
>> >
>> >
>> > 2015-09-07 14:41 GMT+02:00 Benson Margulies <be...@basistech.com>:
>> >>
>> >> frontloading eventadmin did not stop the shell from restarting or all
>> >> the backtraces about, apparently, missing pieces of blueprint.
>> >>
>> >> In an effort to narrow this down, I installed only the features needed
>> >> to get to the last two (the DS feature and the 'null pointer feature')
>> >> -- that eliminated three features.
>> >>
>> >> Installing the DS feature still restarts CXF, which still makes a mess
>> >> due to complaints that it can't find blueprint. This seems really odd
>> >> to me, because the DS feature does not even use CXF.
>> >>
>> >> Is there any way to find out why karaf decides to restart something?
>> >>
>> >> Installing the worker feature still NPE's in the same way.
>> >>
>> >>
>> >>
>> >> On Mon, Sep 7, 2015 at 8:27 AM, Benson Margulies <benson@basistech.com
>> >
>> >> wrote:
>> >> > On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <
>> bcanhome@googlemail.com>
>> >> > wrote:
>> >> >> Ok, so let's try to narrow this down a bit.
>> >> >> At least concerning the SCR feature I'd say it's most likely due to
>> an
>> >> >> dependency on the eventadmin feature, which is know to cause a
>> >> >> "refresh" on
>> >> >> the shell features.
>> >> >> Therefore maybe an early eventadmin feature install could make this
>> one
>> >> >> disappear.
>> >> >
>> >> > Here's more info, I'll try eventadmin in a moment.
>> >> >
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 | Changes to perform:
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   Region: root
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |     Bundles to install:
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> >
>> >> >
>> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> >
>> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
>> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:
>> com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 | Installing bundles:
>> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
>> >> > 2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
>> >> > 2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> >
>> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
>> >> > 2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> >
>> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
>> >> > 2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
>> >> > 2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
>> >> > 2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
>> >> > 2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
>> >> > 2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
>> >> > 2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 | Stopping bundles:
>> >> > 2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
>> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> >> > - 4.0.1 |
>> >> > com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
>> >> > 2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 |
>> BlueprintExtender
>> >> >                | 12 - org.apache.aries.blueprint.core - 1.4.3 |
>> >> > Destroying BlueprintContainer for bundle
>> >> >
>> >> > and goes on to reload all kinds of things, getting exceptions left
>> and
>> >> > right with CXF and blueprint. I wonder about the fact that this
>> >> > feature, in being converted to DS, started using compendium, which it
>> >> > wasn't using before.
>> >> >
>> >> > I can't explain why it wants to stop this bundle (and others) -- the
>> >> > list of things to install is boring other than compendium.
>> >> >
>> >> >
>> >> >>
>> >> >> For me the following seems to be more troublesome:
>> >> >>
>> >> >>> feature:install rosapi-worker-service
>> >> >>
>> >> >>
>> >> >> as it seems to cause an nullpointer in the resolver.
>> >> >>
>> >> >>
>> >> >> Does that one depend on SCR or Blueprint or both?
>> >> >
>> >> > This one just uses blueprint. my working branch is 100% blueprint;
>> >> > this branch has the one service that triggers the shell reload which
>> >> > is DS.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >>
>> >> >> regards, Achim
>> >
>> >
>> >
>> >
>> > --
>> >
>> > Apache Member
>> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer &
>> > Project Lead
>> > blog <http://notizblog.nierbeck.de/>
>> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>> >
>> > Software Architect / Project Manager / Scrum Master
>> >
>>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
As I already said in the other thread,
make sure you don't provide the compendium jar it'll colide with a bunch of
other jars already providing the
needed packages ...

regards, Achim


2015-09-07 15:09 GMT+02:00 Benson Margulies <be...@basistech.com>:

> On Mon, Sep 7, 2015 at 8:48 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > If installing the scr feature triggers to refresh the cxf feature, it
> must
> > be one of the scr bundles contained.
> > Most likely a <bundle dependency="true"> .... might be able to sole that
> for
> > the scr feature.
>
> Achim, did you mean my feature that uses DS or the stock Karaf 'scr'
> feature?
>
> feature:install scr
>
> runs without a squeak.
>
> Installing my relatively tiny feature that has DS metadata is the
> trigger, and the trouble happens even when CXF and SCR are all
> installed before it.
>
> If I compare the version of this feature that works fine (with
> blueprint) with the version that does not (with DS), the only
> difference is the addition of:
>
> <bundle start-level="75">mvn:org.osgi/org.osgi.compendium/5.0.0</bundle>
>
> Plus there's the DS metadata in the bundle that wasn't there before.
>
> Just installing CXF does not even install the compendium bundle, so
> don't see what the dependency issue could be.
>
> However .... I think I may be messing up something basic that could be
> contributing to this.
>
> Maven project A builds a bundle, and then a feature consisting of the
> bundle and its dependencies.
>
> Maven project B builds a project that depends on A, and a feature
> consisting of the B bundle and its dependencies -- which include all
> the A dependencies.
>
> Using the karaf tooling, is there something I'm supposed to do so that
> the B feature has a _feature_ dependency on the A feature instead of
> repeating all those bundles?
>
> --benson
>
> >
> > regards, Achim
> >
> >
> > 2015-09-07 14:41 GMT+02:00 Benson Margulies <be...@basistech.com>:
> >>
> >> frontloading eventadmin did not stop the shell from restarting or all
> >> the backtraces about, apparently, missing pieces of blueprint.
> >>
> >> In an effort to narrow this down, I installed only the features needed
> >> to get to the last two (the DS feature and the 'null pointer feature')
> >> -- that eliminated three features.
> >>
> >> Installing the DS feature still restarts CXF, which still makes a mess
> >> due to complaints that it can't find blueprint. This seems really odd
> >> to me, because the DS feature does not even use CXF.
> >>
> >> Is there any way to find out why karaf decides to restart something?
> >>
> >> Installing the worker feature still NPE's in the same way.
> >>
> >>
> >>
> >> On Mon, Sep 7, 2015 at 8:27 AM, Benson Margulies <be...@basistech.com>
> >> wrote:
> >> > On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <
> bcanhome@googlemail.com>
> >> > wrote:
> >> >> Ok, so let's try to narrow this down a bit.
> >> >> At least concerning the SCR feature I'd say it's most likely due to
> an
> >> >> dependency on the eventadmin feature, which is know to cause a
> >> >> "refresh" on
> >> >> the shell features.
> >> >> Therefore maybe an early eventadmin feature install could make this
> one
> >> >> disappear.
> >> >
> >> > Here's more info, I'll try eventadmin in a moment.
> >> >
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 | Changes to perform:
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   Region: root
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |     Bundles to install:
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> >
> >> >
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> >
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> >> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 | Installing bundles:
> >> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> >> > 2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> >> > 2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> >
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> >> > 2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> >
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> >> > 2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> >> > 2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> >> > 2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
> >> > 2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
> >> > 2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
> >> > 2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 | Stopping bundles:
> >> > 2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
> >> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> >> > - 4.0.1 |
> >> > com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
> >> > 2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 | BlueprintExtender
> >> >                | 12 - org.apache.aries.blueprint.core - 1.4.3 |
> >> > Destroying BlueprintContainer for bundle
> >> >
> >> > and goes on to reload all kinds of things, getting exceptions left and
> >> > right with CXF and blueprint. I wonder about the fact that this
> >> > feature, in being converted to DS, started using compendium, which it
> >> > wasn't using before.
> >> >
> >> > I can't explain why it wants to stop this bundle (and others) -- the
> >> > list of things to install is boring other than compendium.
> >> >
> >> >
> >> >>
> >> >> For me the following seems to be more troublesome:
> >> >>
> >> >>> feature:install rosapi-worker-service
> >> >>
> >> >>
> >> >> as it seems to cause an nullpointer in the resolver.
> >> >>
> >> >>
> >> >> Does that one depend on SCR or Blueprint or both?
> >> >
> >> > This one just uses blueprint. my working branch is 100% blueprint;
> >> > this branch has the one service that triggers the shell reload which
> >> > is DS.
> >> >
> >> >
> >> >
> >> >
> >> >>
> >> >> regards, Achim
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
On Mon, Sep 7, 2015 at 8:48 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> If installing the scr feature triggers to refresh the cxf feature, it must
> be one of the scr bundles contained.
> Most likely a <bundle dependency="true"> .... might be able to sole that for
> the scr feature.

Achim, did you mean my feature that uses DS or the stock Karaf 'scr' feature?

feature:install scr

runs without a squeak.

Installing my relatively tiny feature that has DS metadata is the
trigger, and the trouble happens even when CXF and SCR are all
installed before it.

If I compare the version of this feature that works fine (with
blueprint) with the version that does not (with DS), the only
difference is the addition of:

<bundle start-level="75">mvn:org.osgi/org.osgi.compendium/5.0.0</bundle>

Plus there's the DS metadata in the bundle that wasn't there before.

Just installing CXF does not even install the compendium bundle, so
don't see what the dependency issue could be.

However .... I think I may be messing up something basic that could be
contributing to this.

Maven project A builds a bundle, and then a feature consisting of the
bundle and its dependencies.

Maven project B builds a project that depends on A, and a feature
consisting of the B bundle and its dependencies -- which include all
the A dependencies.

Using the karaf tooling, is there something I'm supposed to do so that
the B feature has a _feature_ dependency on the A feature instead of
repeating all those bundles?

--benson

>
> regards, Achim
>
>
> 2015-09-07 14:41 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>
>> frontloading eventadmin did not stop the shell from restarting or all
>> the backtraces about, apparently, missing pieces of blueprint.
>>
>> In an effort to narrow this down, I installed only the features needed
>> to get to the last two (the DS feature and the 'null pointer feature')
>> -- that eliminated three features.
>>
>> Installing the DS feature still restarts CXF, which still makes a mess
>> due to complaints that it can't find blueprint. This seems really odd
>> to me, because the DS feature does not even use CXF.
>>
>> Is there any way to find out why karaf decides to restart something?
>>
>> Installing the worker feature still NPE's in the same way.
>>
>>
>>
>> On Mon, Sep 7, 2015 at 8:27 AM, Benson Margulies <be...@basistech.com>
>> wrote:
>> > On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <bc...@googlemail.com>
>> > wrote:
>> >> Ok, so let's try to narrow this down a bit.
>> >> At least concerning the SCR feature I'd say it's most likely due to an
>> >> dependency on the eventadmin feature, which is know to cause a
>> >> "refresh" on
>> >> the shell features.
>> >> Therefore maybe an early eventadmin feature install could make this one
>> >> disappear.
>> >
>> > Here's more info, I'll try eventadmin in a moment.
>> >
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 | Changes to perform:
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   Region: root
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |     Bundles to install:
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> >
>> > mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
>> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 | Installing bundles:
>> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
>> > 2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
>> > 2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
>> > 2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
>> > 2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
>> > 2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
>> > 2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
>> > 2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
>> > 2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
>> > 2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 | Stopping bundles:
>> > 2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
>> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
>> > - 4.0.1 |
>> > com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
>> > 2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 | BlueprintExtender
>> >                | 12 - org.apache.aries.blueprint.core - 1.4.3 |
>> > Destroying BlueprintContainer for bundle
>> >
>> > and goes on to reload all kinds of things, getting exceptions left and
>> > right with CXF and blueprint. I wonder about the fact that this
>> > feature, in being converted to DS, started using compendium, which it
>> > wasn't using before.
>> >
>> > I can't explain why it wants to stop this bundle (and others) -- the
>> > list of things to install is boring other than compendium.
>> >
>> >
>> >>
>> >> For me the following seems to be more troublesome:
>> >>
>> >>> feature:install rosapi-worker-service
>> >>
>> >>
>> >> as it seems to cause an nullpointer in the resolver.
>> >>
>> >>
>> >> Does that one depend on SCR or Blueprint or both?
>> >
>> > This one just uses blueprint. my working branch is 100% blueprint;
>> > this branch has the one service that triggers the shell reload which
>> > is DS.
>> >
>> >
>> >
>> >
>> >>
>> >> regards, Achim
>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
If installing the scr feature triggers to refresh the cxf feature, it must
be one of the scr bundles contained.
Most likely a <bundle dependency="true"> .... might be able to sole that
for the scr feature.

regards, Achim


2015-09-07 14:41 GMT+02:00 Benson Margulies <be...@basistech.com>:

> frontloading eventadmin did not stop the shell from restarting or all
> the backtraces about, apparently, missing pieces of blueprint.
>
> In an effort to narrow this down, I installed only the features needed
> to get to the last two (the DS feature and the 'null pointer feature')
> -- that eliminated three features.
>
> Installing the DS feature still restarts CXF, which still makes a mess
> due to complaints that it can't find blueprint. This seems really odd
> to me, because the DS feature does not even use CXF.
>
> Is there any way to find out why karaf decides to restart something?
>
> Installing the worker feature still NPE's in the same way.
>
>
>
> On Mon, Sep 7, 2015 at 8:27 AM, Benson Margulies <be...@basistech.com>
> wrote:
> > On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> >> Ok, so let's try to narrow this down a bit.
> >> At least concerning the SCR feature I'd say it's most likely due to an
> >> dependency on the eventadmin feature, which is know to cause a
> "refresh" on
> >> the shell features.
> >> Therefore maybe an early eventadmin feature install could make this one
> >> disappear.
> >
> > Here's more info, I'll try eventadmin in a moment.
> >
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 | Changes to perform:
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   Region: root
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |     Bundles to install:
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
> >
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
> > mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> > 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
> > mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 | Installing bundles:
> > 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> > 2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> > 2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
>  mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> > 2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
>  mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> > 2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> > 2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:
> com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> > 2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
> > 2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
> > 2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
> > 2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 | Stopping bundles:
> > 2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
> > FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> > - 4.0.1 |
>  com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
> > 2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 | BlueprintExtender
> >                | 12 - org.apache.aries.blueprint.core - 1.4.3 |
> > Destroying BlueprintContainer for bundle
> >
> > and goes on to reload all kinds of things, getting exceptions left and
> > right with CXF and blueprint. I wonder about the fact that this
> > feature, in being converted to DS, started using compendium, which it
> > wasn't using before.
> >
> > I can't explain why it wants to stop this bundle (and others) -- the
> > list of things to install is boring other than compendium.
> >
> >
> >>
> >> For me the following seems to be more troublesome:
> >>
> >>> feature:install rosapi-worker-service
> >>
> >>
> >> as it seems to cause an nullpointer in the resolver.
> >>
> >>
> >> Does that one depend on SCR or Blueprint or both?
> >
> > This one just uses blueprint. my working branch is 100% blueprint;
> > this branch has the one service that triggers the shell reload which
> > is DS.
> >
> >
> >
> >
> >>
> >> regards, Achim
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
frontloading eventadmin did not stop the shell from restarting or all
the backtraces about, apparently, missing pieces of blueprint.

In an effort to narrow this down, I installed only the features needed
to get to the last two (the DS feature and the 'null pointer feature')
-- that eliminated three features.

Installing the DS feature still restarts CXF, which still makes a mess
due to complaints that it can't find blueprint. This seems really odd
to me, because the DS feature does not even use CXF.

Is there any way to find out why karaf decides to restart something?

Installing the worker feature still NPE's in the same way.



On Mon, Sep 7, 2015 at 8:27 AM, Benson Margulies <be...@basistech.com> wrote:
> On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
>> Ok, so let's try to narrow this down a bit.
>> At least concerning the SCR feature I'd say it's most likely due to an
>> dependency on the eventadmin feature, which is know to cause a "refresh" on
>> the shell features.
>> Therefore maybe an early eventadmin feature install could make this one
>> disappear.
>
> Here's more info, I'll try eventadmin in a moment.
>
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 | Changes to perform:
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   Region: root
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |     Bundles to install:
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |
> mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> 2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |
> mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 | Installing bundles:
> 2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
> 2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
> 2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
> 2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
> 2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
> 2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
> 2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
> 2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
> 2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
> 2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 | Stopping bundles:
> 2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
> FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
> - 4.0.1 |   com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
> 2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 | BlueprintExtender
>                | 12 - org.apache.aries.blueprint.core - 1.4.3 |
> Destroying BlueprintContainer for bundle
>
> and goes on to reload all kinds of things, getting exceptions left and
> right with CXF and blueprint. I wonder about the fact that this
> feature, in being converted to DS, started using compendium, which it
> wasn't using before.
>
> I can't explain why it wants to stop this bundle (and others) -- the
> list of things to install is boring other than compendium.
>
>
>>
>> For me the following seems to be more troublesome:
>>
>>> feature:install rosapi-worker-service
>>
>>
>> as it seems to cause an nullpointer in the resolver.
>>
>>
>> Does that one depend on SCR or Blueprint or both?
>
> This one just uses blueprint. my working branch is 100% blueprint;
> this branch has the one service that triggers the shell reload which
> is DS.
>
>
>
>
>>
>> regards, Achim

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
On Mon, Sep 7, 2015 at 8:14 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> Ok, so let's try to narrow this down a bit.
> At least concerning the SCR feature I'd say it's most likely due to an
> dependency on the eventadmin feature, which is know to cause a "refresh" on
> the shell features.
> Therefore maybe an early eventadmin feature install could make this one
> disappear.

Here's more info, I'll try eventadmin in a moment.

2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 | Changes to perform:
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   Region: root
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |     Bundles to install:
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |
mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |
mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
2015-09-07 08:18:10,752 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |
mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:org.apache.commons/commons-compress/1.9
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:org.rauschig/jarchivelib/0.9.100-basis
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |       mvn:org.osgi/org.osgi.compendium/5.0.0
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 | Installing bundles:
2015-09-07 08:18:10,753 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api/1.0.3
2015-09-07 08:18:10,754 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.osgi/rosette-osgi-api-impl/1.0.3
2015-09-07 08:18:10,756 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3/jar/fragment-bundle
2015-09-07 08:18:10,757 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.osgi.template.component/template-component-osgi/1.0.3
2015-09-07 08:18:10,758 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-api/1.5.0-SNAPSHOT
2015-09-07 08:18:10,759 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:com.basistech.ws/rosapi-worker-dummy-sdk/1.5.0-SNAPSHOT/jar
2015-09-07 08:18:10,761 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:org.apache.commons/commons-compress/1.9
2015-09-07 08:18:10,764 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:org.rauschig/jarchivelib/0.9.100-basis
2015-09-07 08:18:10,765 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   mvn:org.osgi/org.osgi.compendium/5.0.0
2015-09-07 08:18:10,770 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 | Stopping bundles:
2015-09-07 08:18:10,772 | INFO  | pool-66-thread-1 |
FeaturesServiceImpl              | 8 - org.apache.karaf.features.core
- 4.0.1 |   com.basistech.ws.rosapi-front-end-service/1.5.0.v20150907115730
2015-09-07 08:18:10,779 | INFO  | pool-66-thread-1 | BlueprintExtender
               | 12 - org.apache.aries.blueprint.core - 1.4.3 |
Destroying BlueprintContainer for bundle

and goes on to reload all kinds of things, getting exceptions left and
right with CXF and blueprint. I wonder about the fact that this
feature, in being converted to DS, started using compendium, which it
wasn't using before.

I can't explain why it wants to stop this bundle (and others) -- the
list of things to install is boring other than compendium.


>
> For me the following seems to be more troublesome:
>
>> feature:install rosapi-worker-service
>
>
> as it seems to cause an nullpointer in the resolver.
>
>
> Does that one depend on SCR or Blueprint or both?

This one just uses blueprint. my working branch is 100% blueprint;
this branch has the one service that triggers the shell reload which
is DS.




>
> regards, Achim

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Ok, so let's try to narrow this down a bit.
At least concerning the SCR feature I'd say it's most likely due to an
dependency on the eventadmin feature, which is know to cause a "refresh" on
the shell features.
Therefore maybe an early eventadmin feature install could make this one
disappear.

For me the following seems to be more troublesome:

feature:install rosapi-worker-service


as it seems to cause an nullpointer in the resolver.


Does that one depent on SCR or Blueprint or both?

regards, Achim



2015-09-07 14:10 GMT+02:00 Benson Margulies <be...@basistech.com>:

> So I fixed my dependency order on bundles, and pretty much reproduced
> the same set of stuff.
>
> I have one more thing to try, which is to put the cfg files for my
> services into place.
>
> karaf@root()> feature:repo-add
>
> file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
> Adding feature url
>
> file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
> karaf@root()> feature:repo-add
> file:/Users/benson/x/rosapi1.5//features/target/feature/feature.xml
> Adding feature url
> file:/Users/benson/x/rosapi1.5//features/target/feature/feature.xml
> karaf@root()>feature:install cxf-jaxrs
> karaf@root()> feature:install rosette-api
> karaf@root()>feature:install rosapi-common
> karaf@root()>feature:install rosapi-front-end-null-request-tracker
> karaf@root()>  feature:install rosapi-front-end-anvils-transport
> karaf@root()> feature:install rosapi-front-end-service
> karaf@root()> feature:install scr
>
> # This is the DS feature. It has no use of blueprint or CXF in it.
> # installing it makes Karaf restart the shell; maybe something in DS
> pulls in a shell command.
>
> karaf@root()> feature:install rosapi-worker-dummy-sdk
>
>         __ __                  ____
>        / //_/____ __________ _/ __/
>       / ,<  / __ `/ ___/ __ `/ /_
>      / /| |/ /_/ / /  / /_/ / __/
>     /_/ |_|\__,_/_/   \__,_/_/
>
>   Apache Karaf (4.0.1)
>
> Hit '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
>
> Looking around at the log I see a lot of exception backtraces. Here's one
> ...
>
>  2015-09-07 08:02:58,052 | WARN  | FelixStartLevel  |
> NamespaceHandlerRegisterer       | 55 - org.apache.cxf.cxf-core -
> 3.1.2 | Aries Blueprint packages not available. So namespaces will not
> be registered
> java.lang.NoClassDefFoundError: org/apache/aries/blueprint/NamespaceHandler
> at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_60]
>
> aries-blackboard is installed, so I am to say the least puzzled.
>
> karaf@root()> karaf@root()> feature:install rosapi-worker-service
> Error executing command: java.lang.NullPointerException
> karaf@root()> log:exception-display
> java.lang.NullPointerException
> at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>
>
> On Mon, Sep 7, 2015 at 7:57 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > That's not a reboot, it's just a restart of the shell, so one of your
> > bundles you installed does
> > trigger a restart of the shell bundle.
> >
> > regards, Achim
> >
> >
> > 2015-09-07 13:54 GMT+02:00 Benson Margulies <be...@basistech.com>:
> >>
> >> One-by-one, I get three interesting things.
> >>
> >> 1: I need to install the first few features in an unexpected order due
> >> to a mistake I'll correct.
> >> 2: Karaf 'reboots' after I install the DS feature, but that might be
> >> because I didn't actually install scr.
> >> 3: As soon as I install the last feature, I get an NPE backtrace from
> >> the subsystem resolver.
> >>
> >> I think I'll fix the first issue and then try again.
> >>
> >> feature:repo-add
> >>
> >>
> file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
> >> feature:repo-add
> >> file:/users/benson/x/rosapi1.5/features/target/feature/feature.xml
> >>
> >> feature:install cxf-jaxrs
> >> feature:install jolokia
> >> feature:install rosette-api
> >> feature:install rosapi-common
> >> Error executing command: Unable to resolve root: missing requirement
> >> [root] osgi.identity; osgi.identity=rosapi-common; type=karaf.feature;
> >> version="[1.5.0.SNAPSHOT,1.5.0.SNAPSHOT]";
> >>
> >>
> filter:="(&(osgi.identity=rosapi-common)(type=karaf.feature)(version>=1.5.0.SNAPSHOT)(version<=1.5.0.SNAPSHOT))"
> >> [caused by: Unable to resolve rosapi-common/1.5.0.SNAPSHOT: missing
> >> requirement [rosapi-common/1.5.0.SNAPSHOT] osgi.identity;
> >> osgi.identity=org.apache.bval.org.apache.bval.bundle;
> >> type=osgi.bundle; version="[1.1.0,1.1.0]"; resolution:=mandatory
> >> [caused by: Unable to resolve
> >> org.apache.bval.org.apache.bval.bundle/1.1.0: missing requirement
> >> [org.apache.bval.org.apache.bval.bundle/1.1.0] osgi.wiring.package;
> >> filter:="(osgi.wiring.package=javax.el)"]]
> >>
> >> karaf@root()> feature:install rosapi-front-end-service
> >> karaf@root()> feature:install rosapi-common
> >> karaf@root()> feature:install rosapi-front-end-null-request-tracker
> >> karaf@root()> feature:install rosapi-front-end-anvils-transport
> >> karaf@root()> feature:install rosapi-worker-dummy-sdk
> >>
> >> Karaf 'rebooted'? (printed welcome logo).
> >>
> >> feature:install rosapi-worker-service
> >>
> >> 2015-09-07 07:49:34,862 | ERROR | nsole user karaf | ShellUtil
> >>                | 43 - org.apache.karaf.shell.core - 4.0.1 | Exception
> >> caught while executing command
> >> java.lang.NullPointerException
> >> at
> >>
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
> >> at
> >>
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
> >> at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
> >> at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
> >> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
> >> at
> >>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
> >> at
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
> >> at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
> >>
> >> On Mon, Sep 7, 2015 at 2:58 AM, Achim Nierbeck <bcanhome@googlemail.com
> >
> >> wrote:
> >> > Hi Benson,
> >> >
> >> > did you try to reproduce it on a vanilla Karaf with installing one
> >> > feature
> >> > after the other.
> >> > Just to make sure which one is actually causing it?
> >> > Might be that some bundles are in conflict.
> >> >
> >> > regards, Achim
> >> >
> >> > 2015-09-07 3:35 GMT+02:00 Benson Margulies <be...@basistech.com>:
> >> >>
> >> >> Some more info:
> >> >>
> >> >> Bottom stack trace.
> >> >>
> >> >> "pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
> >> >>   java.lang.Thread.State: RUNNABLE
> >> >>  at
> >> >>
> >> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
> >> >>  - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
> >> >>  at
> org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
> >> >>  at
> >> >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
> >> >>  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
> >> >>  at
> >> >>
> >> >>
> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
> >> >>  at
> >> >>
> >> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
> >> >>  at
> >> >>
> >> >>
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
> >> >>  at
> >> >>
> >> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >> >>  at
> >> >>
> >> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >> >>  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)
> >> >>
> >> >> this =
> >> >>
> {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
> >> >> Exception = {java.lang.NullPointerException@3704}
> >> >> thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
> >> >> bndToRes = {java.util.HashMap@3715}  size = 158
> >> >> wiring = {java.util.HashMap@3716}  size = 250
> >> >> requirement =
> >> >> {org.apache.felix.framework.wiring.BundleRequirementImpl@3717}
> >> >> "[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
> >> >>
> (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
> >> >> candidates =
> >> >> {org.apache.felix.framework.util.ShrinkableCollection@3718}
> >> >>  size = 3
> >> >> sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
> >> >> "org.ops4j.pax.url.mvn [5]"
> >> >> sourceResource = null
> >> >> wired = {java.util.HashSet@3720}  size = 1
> >> >>
> >> >> On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <
> benson@basistech.com>
> >> >> wrote:
> >> >> > I have a working version of my stuff that entirely uses blueprint.
> >> >> >
> >> >> > My assembly lists a set of boot features:
> >> >> >
> >> >> >  <feature>aries-blueprint</feature>
> >> >> >     <feature>bundle</feature>
> >> >> >     <feature>config</feature>
> >> >> >     <feature>diagnostic</feature>
> >> >> >     <feature>feature</feature>
> >> >> >     <feature>jaas</feature>
> >> >> >     <feature>shell</feature>
> >> >> >     <feature>log</feature>
> >> >> >     <feature>management</feature>
> >> >> >     <feature>package</feature>
> >> >> >     <feature>shell-compat</feature>
> >> >> >     <feature>ssh</feature>
> >> >> >     <feature>system</feature>
> >> >> >     <feature>wrap</feature>
> >> >> >     <feature>jolokia</feature>
> >> >> >     <feature>war</feature>
> >> >> >     <feature>cxf-jaxrs</feature>
> >> >> >     <feature>rosette-api</feature>
> >> >> >     <feature>rosapi-common</feature>
> >> >> >     <feature>rosapi-front-end-null-request-tracker</feature>
> >> >> >     <feature>rosapi-front-end-anvils-transport</feature>
> >> >> >     <feature>rosapi-front-end-service</feature>
> >> >> >     <feature>rosapi-worker-service</feature>
> >> >> >     <feature>rosapi-worker-dummy-sdk</feature>
> >> >> > </bootFeatures>
> >> >> >
> >> >> > I want to add one component that uses DS, so I added
> >> >> > <feature>scr</feature> into the list.
> >> >> >
> >> >> > When I start the assembled assembly, I get:
> >> >> >
> >> >> > As you will see at the bottom, the resulting environment is quite
> >> >> > sad;
> >> >> > it has no log commands.
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > karaf@root
> >org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> >> >> > : Error installing boot features
> >> >> > org.apache.karaf.features.internal.util.MultiException: Error
> >> >> > restarting
> >> >> > bundles
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >> >> > 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)
> >> >> > Suppressed: org.osgi.framework.BundleException: Activator start
> error
> >> >> > in bundle org.ops4j.pax.url.wrap [149].
> >> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
> >> >> > at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
> >> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
> >> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
> >> >> > ... 6 more
> >> >> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
> >> >> > at java.net.URL.toExternalForm(URL.java:922)
> >> >> > at java.net.URL.toString(URL.java:908)
> >> >> > at
> >> >> >
> java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
> >> >> > at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
> >> >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
> >> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
> >> >> > ... 11 more
> >> >> >
> >> >> >
> >> >> >
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> >> >> > : Error installing boot features
> >> >> > java.lang.NullPointerException
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >> >> > 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)
> >> >> > log:display
> >> >> > Command not found: log:display
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> >
> >> > Apache Member
> >> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer
> >> > &
> >> > Project Lead
> >> > blog <http://notizblog.nierbeck.de/>
> >> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >> >
> >> > Software Architect / Project Manager / Scrum Master
> >> >
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
So I fixed my dependency order on bundles, and pretty much reproduced
the same set of stuff.

I have one more thing to try, which is to put the cfg files for my
services into place.

karaf@root()> feature:repo-add
file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
Adding feature url
file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
karaf@root()> feature:repo-add
file:/Users/benson/x/rosapi1.5//features/target/feature/feature.xml
Adding feature url
file:/Users/benson/x/rosapi1.5//features/target/feature/feature.xml
karaf@root()>feature:install cxf-jaxrs
karaf@root()> feature:install rosette-api
karaf@root()>feature:install rosapi-common
karaf@root()>feature:install rosapi-front-end-null-request-tracker
karaf@root()>  feature:install rosapi-front-end-anvils-transport
karaf@root()> feature:install rosapi-front-end-service
karaf@root()> feature:install scr

# This is the DS feature. It has no use of blueprint or CXF in it.
# installing it makes Karaf restart the shell; maybe something in DS
pulls in a shell command.

karaf@root()> feature:install rosapi-worker-dummy-sdk

        __ __                  ____
       / //_/____ __________ _/ __/
      / ,<  / __ `/ ___/ __ `/ /_
     / /| |/ /_/ / /  / /_/ / __/
    /_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (4.0.1)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.

Looking around at the log I see a lot of exception backtraces. Here's one ...

 2015-09-07 08:02:58,052 | WARN  | FelixStartLevel  |
NamespaceHandlerRegisterer       | 55 - org.apache.cxf.cxf-core -
3.1.2 | Aries Blueprint packages not available. So namespaces will not
be registered
java.lang.NoClassDefFoundError: org/apache/aries/blueprint/NamespaceHandler
at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_60]

aries-blackboard is installed, so I am to say the least puzzled.

karaf@root()> karaf@root()> feature:install rosapi-worker-service
Error executing command: java.lang.NullPointerException
karaf@root()> log:exception-display
java.lang.NullPointerException
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]


On Mon, Sep 7, 2015 at 7:57 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> That's not a reboot, it's just a restart of the shell, so one of your
> bundles you installed does
> trigger a restart of the shell bundle.
>
> regards, Achim
>
>
> 2015-09-07 13:54 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>
>> One-by-one, I get three interesting things.
>>
>> 1: I need to install the first few features in an unexpected order due
>> to a mistake I'll correct.
>> 2: Karaf 'reboots' after I install the DS feature, but that might be
>> because I didn't actually install scr.
>> 3: As soon as I install the last feature, I get an NPE backtrace from
>> the subsystem resolver.
>>
>> I think I'll fix the first issue and then try again.
>>
>> feature:repo-add
>>
>> file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
>> feature:repo-add
>> file:/users/benson/x/rosapi1.5/features/target/feature/feature.xml
>>
>> feature:install cxf-jaxrs
>> feature:install jolokia
>> feature:install rosette-api
>> feature:install rosapi-common
>> Error executing command: Unable to resolve root: missing requirement
>> [root] osgi.identity; osgi.identity=rosapi-common; type=karaf.feature;
>> version="[1.5.0.SNAPSHOT,1.5.0.SNAPSHOT]";
>>
>> filter:="(&(osgi.identity=rosapi-common)(type=karaf.feature)(version>=1.5.0.SNAPSHOT)(version<=1.5.0.SNAPSHOT))"
>> [caused by: Unable to resolve rosapi-common/1.5.0.SNAPSHOT: missing
>> requirement [rosapi-common/1.5.0.SNAPSHOT] osgi.identity;
>> osgi.identity=org.apache.bval.org.apache.bval.bundle;
>> type=osgi.bundle; version="[1.1.0,1.1.0]"; resolution:=mandatory
>> [caused by: Unable to resolve
>> org.apache.bval.org.apache.bval.bundle/1.1.0: missing requirement
>> [org.apache.bval.org.apache.bval.bundle/1.1.0] osgi.wiring.package;
>> filter:="(osgi.wiring.package=javax.el)"]]
>>
>> karaf@root()> feature:install rosapi-front-end-service
>> karaf@root()> feature:install rosapi-common
>> karaf@root()> feature:install rosapi-front-end-null-request-tracker
>> karaf@root()> feature:install rosapi-front-end-anvils-transport
>> karaf@root()> feature:install rosapi-worker-dummy-sdk
>>
>> Karaf 'rebooted'? (printed welcome logo).
>>
>> feature:install rosapi-worker-service
>>
>> 2015-09-07 07:49:34,862 | ERROR | nsole user karaf | ShellUtil
>>                | 43 - org.apache.karaf.shell.core - 4.0.1 | Exception
>> caught while executing command
>> java.lang.NullPointerException
>> at
>> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
>> at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
>> at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
>> at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
>> at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>>
>> On Mon, Sep 7, 2015 at 2:58 AM, Achim Nierbeck <bc...@googlemail.com>
>> wrote:
>> > Hi Benson,
>> >
>> > did you try to reproduce it on a vanilla Karaf with installing one
>> > feature
>> > after the other.
>> > Just to make sure which one is actually causing it?
>> > Might be that some bundles are in conflict.
>> >
>> > regards, Achim
>> >
>> > 2015-09-07 3:35 GMT+02:00 Benson Margulies <be...@basistech.com>:
>> >>
>> >> Some more info:
>> >>
>> >> Bottom stack trace.
>> >>
>> >> "pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
>> >>   java.lang.Thread.State: RUNNABLE
>> >>  at
>> >>
>> >> org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
>> >>  at
>> >>
>> >> org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
>> >>  at
>> >>
>> >> org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
>> >>  - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
>> >>  at
>> >>
>> >> org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
>> >>  at
>> >>
>> >> org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
>> >>  at org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
>> >>  at
>> >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
>> >>  at
>> >>
>> >> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
>> >>  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
>> >>  at
>> >>
>> >> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
>> >>  at
>> >>
>> >> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
>> >>  at
>> >>
>> >> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
>> >>  at
>> >>
>> >> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>> >>  at
>> >>
>> >> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>> >>  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)
>> >>
>> >> this =
>> >> {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
>> >> Exception = {java.lang.NullPointerException@3704}
>> >> thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
>> >> bndToRes = {java.util.HashMap@3715}  size = 158
>> >> wiring = {java.util.HashMap@3716}  size = 250
>> >> requirement =
>> >> {org.apache.felix.framework.wiring.BundleRequirementImpl@3717}
>> >> "[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
>> >> (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
>> >> candidates =
>> >> {org.apache.felix.framework.util.ShrinkableCollection@3718}
>> >>  size = 3
>> >> sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
>> >> "org.ops4j.pax.url.mvn [5]"
>> >> sourceResource = null
>> >> wired = {java.util.HashSet@3720}  size = 1
>> >>
>> >> On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <be...@basistech.com>
>> >> wrote:
>> >> > I have a working version of my stuff that entirely uses blueprint.
>> >> >
>> >> > My assembly lists a set of boot features:
>> >> >
>> >> >  <feature>aries-blueprint</feature>
>> >> >     <feature>bundle</feature>
>> >> >     <feature>config</feature>
>> >> >     <feature>diagnostic</feature>
>> >> >     <feature>feature</feature>
>> >> >     <feature>jaas</feature>
>> >> >     <feature>shell</feature>
>> >> >     <feature>log</feature>
>> >> >     <feature>management</feature>
>> >> >     <feature>package</feature>
>> >> >     <feature>shell-compat</feature>
>> >> >     <feature>ssh</feature>
>> >> >     <feature>system</feature>
>> >> >     <feature>wrap</feature>
>> >> >     <feature>jolokia</feature>
>> >> >     <feature>war</feature>
>> >> >     <feature>cxf-jaxrs</feature>
>> >> >     <feature>rosette-api</feature>
>> >> >     <feature>rosapi-common</feature>
>> >> >     <feature>rosapi-front-end-null-request-tracker</feature>
>> >> >     <feature>rosapi-front-end-anvils-transport</feature>
>> >> >     <feature>rosapi-front-end-service</feature>
>> >> >     <feature>rosapi-worker-service</feature>
>> >> >     <feature>rosapi-worker-dummy-sdk</feature>
>> >> > </bootFeatures>
>> >> >
>> >> > I want to add one component that uses DS, so I added
>> >> > <feature>scr</feature> into the list.
>> >> >
>> >> > When I start the assembled assembly, I get:
>> >> >
>> >> > As you will see at the bottom, the resulting environment is quite
>> >> > sad;
>> >> > it has no log commands.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > karaf@root>org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
>> >> > : Error installing boot features
>> >> > org.apache.karaf.features.internal.util.MultiException: Error
>> >> > restarting
>> >> > bundles
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>> >> > 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)
>> >> > Suppressed: org.osgi.framework.BundleException: Activator start error
>> >> > in bundle org.ops4j.pax.url.wrap [149].
>> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
>> >> > at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
>> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
>> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
>> >> > ... 6 more
>> >> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
>> >> > at java.net.URL.toExternalForm(URL.java:922)
>> >> > at java.net.URL.toString(URL.java:908)
>> >> > at
>> >> > java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
>> >> > at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
>> >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
>> >> > at
>> >> >
>> >> > org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
>> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
>> >> > ... 11 more
>> >> >
>> >> >
>> >> > org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
>> >> > : Error installing boot features
>> >> > java.lang.NullPointerException
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>> >> > at
>> >> >
>> >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>> >> > 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)
>> >> > log:display
>> >> > Command not found: log:display
>> >
>> >
>> >
>> >
>> > --
>> >
>> > Apache Member
>> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> > &
>> > Project Lead
>> > blog <http://notizblog.nierbeck.de/>
>> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>> >
>> > Software Architect / Project Manager / Scrum Master
>> >
>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
That's not a reboot, it's just a restart of the shell, so one of your
bundles you installed does
trigger a restart of the shell bundle.

regards, Achim


2015-09-07 13:54 GMT+02:00 Benson Margulies <be...@basistech.com>:

> One-by-one, I get three interesting things.
>
> 1: I need to install the first few features in an unexpected order due
> to a mistake I'll correct.
> 2: Karaf 'reboots' after I install the DS feature, but that might be
> because I didn't actually install scr.
> 3: As soon as I install the last feature, I get an NPE backtrace from
> the subsystem resolver.
>
> I think I'll fix the first issue and then try again.
>
> feature:repo-add
>
> file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
> feature:repo-add
> file:/users/benson/x/rosapi1.5/features/target/feature/feature.xml
>
> feature:install cxf-jaxrs
> feature:install jolokia
> feature:install rosette-api
> feature:install rosapi-common
> Error executing command: Unable to resolve root: missing requirement
> [root] osgi.identity; osgi.identity=rosapi-common; type=karaf.feature;
> version="[1.5.0.SNAPSHOT,1.5.0.SNAPSHOT]";
>
> filter:="(&(osgi.identity=rosapi-common)(type=karaf.feature)(version>=1.5.0.SNAPSHOT)(version<=1.5.0.SNAPSHOT))"
> [caused by: Unable to resolve rosapi-common/1.5.0.SNAPSHOT: missing
> requirement [rosapi-common/1.5.0.SNAPSHOT] osgi.identity;
> osgi.identity=org.apache.bval.org.apache.bval.bundle;
> type=osgi.bundle; version="[1.1.0,1.1.0]"; resolution:=mandatory
> [caused by: Unable to resolve
> org.apache.bval.org.apache.bval.bundle/1.1.0: missing requirement
> [org.apache.bval.org.apache.bval.bundle/1.1.0] osgi.wiring.package;
> filter:="(osgi.wiring.package=javax.el)"]]
>
> karaf@root()> feature:install rosapi-front-end-service
> karaf@root()> feature:install rosapi-common
> karaf@root()> feature:install rosapi-front-end-null-request-tracker
> karaf@root()> feature:install rosapi-front-end-anvils-transport
> karaf@root()> feature:install rosapi-worker-dummy-sdk
>
> Karaf 'rebooted'? (printed welcome logo).
>
> feature:install rosapi-worker-service
>
> 2015-09-07 07:49:34,862 | ERROR | nsole user karaf | ShellUtil
>                | 43 - org.apache.karaf.shell.core - 4.0.1 | Exception
> caught while executing command
> java.lang.NullPointerException
> at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>
> On Mon, Sep 7, 2015 at 2:58 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
> > Hi Benson,
> >
> > did you try to reproduce it on a vanilla Karaf with installing one
> feature
> > after the other.
> > Just to make sure which one is actually causing it?
> > Might be that some bundles are in conflict.
> >
> > regards, Achim
> >
> > 2015-09-07 3:35 GMT+02:00 Benson Margulies <be...@basistech.com>:
> >>
> >> Some more info:
> >>
> >> Bottom stack trace.
> >>
> >> "pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
> >>   java.lang.Thread.State: RUNNABLE
> >>  at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
> >>  at
> >>
> org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
> >>  at
> >>
> org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
> >>  - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
> >>  at
> >>
> org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
> >>  at
> >>
> org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
> >>  at org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
> >>  at
> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
> >>  at
> >>
> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
> >>  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
> >>  at
> >>
> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
> >>  at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
> >>  at
> >>
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
> >>  at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >>  at
> >>
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >>  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)
> >>
> >> this =
> >> {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
> >> Exception = {java.lang.NullPointerException@3704}
> >> thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
> >> bndToRes = {java.util.HashMap@3715}  size = 158
> >> wiring = {java.util.HashMap@3716}  size = 250
> >> requirement =
> >> {org.apache.felix.framework.wiring.BundleRequirementImpl@3717}
> >> "[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
> >> (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
> >> candidates = {org.apache.felix.framework.util.ShrinkableCollection@3718
> }
> >>  size = 3
> >> sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
> >> "org.ops4j.pax.url.mvn [5]"
> >> sourceResource = null
> >> wired = {java.util.HashSet@3720}  size = 1
> >>
> >> On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <be...@basistech.com>
> >> wrote:
> >> > I have a working version of my stuff that entirely uses blueprint.
> >> >
> >> > My assembly lists a set of boot features:
> >> >
> >> >  <feature>aries-blueprint</feature>
> >> >     <feature>bundle</feature>
> >> >     <feature>config</feature>
> >> >     <feature>diagnostic</feature>
> >> >     <feature>feature</feature>
> >> >     <feature>jaas</feature>
> >> >     <feature>shell</feature>
> >> >     <feature>log</feature>
> >> >     <feature>management</feature>
> >> >     <feature>package</feature>
> >> >     <feature>shell-compat</feature>
> >> >     <feature>ssh</feature>
> >> >     <feature>system</feature>
> >> >     <feature>wrap</feature>
> >> >     <feature>jolokia</feature>
> >> >     <feature>war</feature>
> >> >     <feature>cxf-jaxrs</feature>
> >> >     <feature>rosette-api</feature>
> >> >     <feature>rosapi-common</feature>
> >> >     <feature>rosapi-front-end-null-request-tracker</feature>
> >> >     <feature>rosapi-front-end-anvils-transport</feature>
> >> >     <feature>rosapi-front-end-service</feature>
> >> >     <feature>rosapi-worker-service</feature>
> >> >     <feature>rosapi-worker-dummy-sdk</feature>
> >> > </bootFeatures>
> >> >
> >> > I want to add one component that uses DS, so I added
> >> > <feature>scr</feature> into the list.
> >> >
> >> > When I start the assembled assembly, I get:
> >> >
> >> > As you will see at the bottom, the resulting environment is quite sad;
> >> > it has no log commands.
> >> >
> >> >
> >> >
> >> >
> >> > karaf@root
> >org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> >> > : Error installing boot features
> >> > org.apache.karaf.features.internal.util.MultiException: Error
> restarting
> >> > bundles
> >> > at
> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >> > 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)
> >> > Suppressed: org.osgi.framework.BundleException: Activator start error
> >> > in bundle org.ops4j.pax.url.wrap [149].
> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
> >> > at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
> >> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
> >> > ... 6 more
> >> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> >> > at
> >> >
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
> >> > at
> >> >
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
> >> > at java.net.URL.toExternalForm(URL.java:922)
> >> > at java.net.URL.toString(URL.java:908)
> >> > at
> java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
> >> > at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
> >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> >> > at
> >> >
> org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
> >> > at
> >> >
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
> >> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
> >> > ... 11 more
> >> >
> >> >
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> >> > : Error installing boot features
> >> > java.lang.NullPointerException
> >> > at
> >> >
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> >> > at
> >> >
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> >> > 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)
> >> > log:display
> >> > Command not found: log:display
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
One-by-one, I get three interesting things.

1: I need to install the first few features in an unexpected order due
to a mistake I'll correct.
2: Karaf 'reboots' after I install the DS feature, but that might be
because I didn't actually install scr.
3: As soon as I install the last feature, I get an NPE backtrace from
the subsystem resolver.

I think I'll fix the first issue and then try again.

feature:repo-add
file:/Users/benson/.m2/repository/org/apache/cxf/karaf/apache-cxf/3.1.2/apache-cxf-3.1.2-features.xml
feature:repo-add
file:/users/benson/x/rosapi1.5/features/target/feature/feature.xml

feature:install cxf-jaxrs
feature:install jolokia
feature:install rosette-api
feature:install rosapi-common
Error executing command: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=rosapi-common; type=karaf.feature;
version="[1.5.0.SNAPSHOT,1.5.0.SNAPSHOT]";
filter:="(&(osgi.identity=rosapi-common)(type=karaf.feature)(version>=1.5.0.SNAPSHOT)(version<=1.5.0.SNAPSHOT))"
[caused by: Unable to resolve rosapi-common/1.5.0.SNAPSHOT: missing
requirement [rosapi-common/1.5.0.SNAPSHOT] osgi.identity;
osgi.identity=org.apache.bval.org.apache.bval.bundle;
type=osgi.bundle; version="[1.1.0,1.1.0]"; resolution:=mandatory
[caused by: Unable to resolve
org.apache.bval.org.apache.bval.bundle/1.1.0: missing requirement
[org.apache.bval.org.apache.bval.bundle/1.1.0] osgi.wiring.package;
filter:="(osgi.wiring.package=javax.el)"]]

karaf@root()> feature:install rosapi-front-end-service
karaf@root()> feature:install rosapi-common
karaf@root()> feature:install rosapi-front-end-null-request-tracker
karaf@root()> feature:install rosapi-front-end-anvils-transport
karaf@root()> feature:install rosapi-worker-dummy-sdk

Karaf 'rebooted'? (printed welcome logo).

feature:install rosapi-worker-service

2015-09-07 07:49:34,862 | ERROR | nsole user karaf | ShellUtil
               | 43 - org.apache.karaf.shell.core - 4.0.1 | Exception
caught while executing command
java.lang.NullPointerException
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[8:org.apache.karaf.features.core:4.0.1]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[8:org.apache.karaf.features.core:4.0.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]

On Mon, Sep 7, 2015 at 2:58 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> Hi Benson,
>
> did you try to reproduce it on a vanilla Karaf with installing one feature
> after the other.
> Just to make sure which one is actually causing it?
> Might be that some bundles are in conflict.
>
> regards, Achim
>
> 2015-09-07 3:35 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>
>> Some more info:
>>
>> Bottom stack trace.
>>
>> "pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
>>   java.lang.Thread.State: RUNNABLE
>>  at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
>>  at
>> org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
>>  at
>> org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
>>  - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
>>  at
>> org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
>>  at
>> org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
>>  at org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
>>  at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
>>  at
>> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
>>  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
>>  at
>> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
>>  at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
>>  at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
>>  at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>>  at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>>  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)
>>
>> this =
>> {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
>> Exception = {java.lang.NullPointerException@3704}
>> thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
>> bndToRes = {java.util.HashMap@3715}  size = 158
>> wiring = {java.util.HashMap@3716}  size = 250
>> requirement =
>> {org.apache.felix.framework.wiring.BundleRequirementImpl@3717}
>> "[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
>> (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
>> candidates = {org.apache.felix.framework.util.ShrinkableCollection@3718}
>>  size = 3
>> sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
>> "org.ops4j.pax.url.mvn [5]"
>> sourceResource = null
>> wired = {java.util.HashSet@3720}  size = 1
>>
>> On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <be...@basistech.com>
>> wrote:
>> > I have a working version of my stuff that entirely uses blueprint.
>> >
>> > My assembly lists a set of boot features:
>> >
>> >  <feature>aries-blueprint</feature>
>> >     <feature>bundle</feature>
>> >     <feature>config</feature>
>> >     <feature>diagnostic</feature>
>> >     <feature>feature</feature>
>> >     <feature>jaas</feature>
>> >     <feature>shell</feature>
>> >     <feature>log</feature>
>> >     <feature>management</feature>
>> >     <feature>package</feature>
>> >     <feature>shell-compat</feature>
>> >     <feature>ssh</feature>
>> >     <feature>system</feature>
>> >     <feature>wrap</feature>
>> >     <feature>jolokia</feature>
>> >     <feature>war</feature>
>> >     <feature>cxf-jaxrs</feature>
>> >     <feature>rosette-api</feature>
>> >     <feature>rosapi-common</feature>
>> >     <feature>rosapi-front-end-null-request-tracker</feature>
>> >     <feature>rosapi-front-end-anvils-transport</feature>
>> >     <feature>rosapi-front-end-service</feature>
>> >     <feature>rosapi-worker-service</feature>
>> >     <feature>rosapi-worker-dummy-sdk</feature>
>> > </bootFeatures>
>> >
>> > I want to add one component that uses DS, so I added
>> > <feature>scr</feature> into the list.
>> >
>> > When I start the assembled assembly, I get:
>> >
>> > As you will see at the bottom, the resulting environment is quite sad;
>> > it has no log commands.
>> >
>> >
>> >
>> >
>> > karaf@root>org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
>> > : Error installing boot features
>> > org.apache.karaf.features.internal.util.MultiException: Error restarting
>> > bundles
>> > at
>> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
>> > at
>> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>> > at
>> > org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>> > 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)
>> > Suppressed: org.osgi.framework.BundleException: Activator start error
>> > in bundle org.ops4j.pax.url.wrap [149].
>> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
>> > at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
>> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
>> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
>> > at
>> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
>> > at
>> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
>> > ... 6 more
>> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>> > at
>> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
>> > at
>> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
>> > at java.net.URL.toExternalForm(URL.java:922)
>> > at java.net.URL.toString(URL.java:908)
>> > at java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
>> > at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> > at
>> > org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
>> > at
>> > org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
>> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
>> > ... 11 more
>> >
>> > org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
>> > : Error installing boot features
>> > java.lang.NullPointerException
>> > at
>> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
>> > at
>> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
>> > at
>> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>> > at
>> > org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>> > 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)
>> > log:display
>> > Command not found: log:display
>
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Benson,

did you try to reproduce it on a vanilla Karaf with installing one feature
after the other.
Just to make sure which one is actually causing it?
Might be that some bundles are in conflict.

regards, Achim

2015-09-07 3:35 GMT+02:00 Benson Margulies <be...@basistech.com>:

> Some more info:
>
> Bottom stack trace.
>
> "pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
>   java.lang.Thread.State: RUNNABLE
>  at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
>  at
> org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
>  at
> org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
>  - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
>  at
> org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
>  at
> org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
>  at org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
>  at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
>  at
> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
>  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
>  at
> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
>  at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
>  at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
>  at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
>  at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
>  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)
>
> this =
> {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
> Exception = {java.lang.NullPointerException@3704}
> thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
> bndToRes = {java.util.HashMap@3715}  size = 158
> wiring = {java.util.HashMap@3716}  size = 250
> requirement = {org.apache.felix.framework.wiring.BundleRequirementImpl@3717
> }
> "[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
> (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
> candidates = {org.apache.felix.framework.util.ShrinkableCollection@3718}
>  size = 3
> sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
> "org.ops4j.pax.url.mvn [5]"
> sourceResource = null
> wired = {java.util.HashSet@3720}  size = 1
>
> On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <be...@basistech.com>
> wrote:
> > I have a working version of my stuff that entirely uses blueprint.
> >
> > My assembly lists a set of boot features:
> >
> >  <feature>aries-blueprint</feature>
> >     <feature>bundle</feature>
> >     <feature>config</feature>
> >     <feature>diagnostic</feature>
> >     <feature>feature</feature>
> >     <feature>jaas</feature>
> >     <feature>shell</feature>
> >     <feature>log</feature>
> >     <feature>management</feature>
> >     <feature>package</feature>
> >     <feature>shell-compat</feature>
> >     <feature>ssh</feature>
> >     <feature>system</feature>
> >     <feature>wrap</feature>
> >     <feature>jolokia</feature>
> >     <feature>war</feature>
> >     <feature>cxf-jaxrs</feature>
> >     <feature>rosette-api</feature>
> >     <feature>rosapi-common</feature>
> >     <feature>rosapi-front-end-null-request-tracker</feature>
> >     <feature>rosapi-front-end-anvils-transport</feature>
> >     <feature>rosapi-front-end-service</feature>
> >     <feature>rosapi-worker-service</feature>
> >     <feature>rosapi-worker-dummy-sdk</feature>
> > </bootFeatures>
> >
> > I want to add one component that uses DS, so I added
> > <feature>scr</feature> into the list.
> >
> > When I start the assembled assembly, I get:
> >
> > As you will see at the bottom, the resulting environment is quite sad;
> > it has no log commands.
> >
> >
> >
> > karaf@root
> >org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> > : Error installing boot features
> > org.apache.karaf.features.internal.util.MultiException: Error restarting
> bundles
> > at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
> > at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> > at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> > 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)
> > Suppressed: org.osgi.framework.BundleException: Activator start error
> > in bundle org.ops4j.pax.url.wrap [149].
> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
> > at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
> > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
> > at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
> > at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
> > ... 6 more
> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> > at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
> > at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
> > at java.net.URL.toExternalForm(URL.java:922)
> > at java.net.URL.toString(URL.java:908)
> > at java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
> > at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
> > at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
> > at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
> > at
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> > at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > at
> org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
> > at
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
> > ... 11 more
> >
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> > : Error installing boot features
> > java.lang.NullPointerException
> > at
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
> > at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
> > at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> > at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> > 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)
> > log:display
> > Command not found: log:display
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Combining DS and blueprint in a karaf assembly yields -- chaos?

Posted by Benson Margulies <be...@basistech.com>.
Some more info:

Bottom stack trace.

"pool-2-thread-1@3587" prio=5 tid=0x1b nid=NA runnable
  java.lang.Thread.State: RUNNABLE
 at org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.filterMatches(FeaturesServiceImpl.java:1232)
 at org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1425)
 at org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:282)
 - locked <0x5ab> (a org.apache.felix.framework.StatefulResolver)
 at org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:89)
 at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:288)
 at org.apache.felix.resolver.Candidates.populate(Candidates.java:177)
 at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:168)
 at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)
 at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4073)
 at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
 at org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1267)
 at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:823)
 at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
 at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
 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)

this = {org.apache.karaf.features.internal.service.FeaturesServiceImpl$3@3705}
Exception = {java.lang.NullPointerException@3704}
thread = {java.lang.Thread@3587} "Thread[pool-2-thread-1,5,main]"
bndToRes = {java.util.HashMap@3715}  size = 158
wiring = {java.util.HashMap@3716}  size = 250
requirement = {org.apache.felix.framework.wiring.BundleRequirementImpl@3717}
"[org.ops4j.pax.url.mvn [5](R 5.0)] osgi.wiring.package;
(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"
candidates = {org.apache.felix.framework.util.ShrinkableCollection@3718}
 size = 3
sourceBundle = {org.apache.felix.framework.BundleImpl@3719}
"org.ops4j.pax.url.mvn [5]"
sourceResource = null
wired = {java.util.HashSet@3720}  size = 1

On Sun, Sep 6, 2015 at 7:48 PM, Benson Margulies <be...@basistech.com> wrote:
> I have a working version of my stuff that entirely uses blueprint.
>
> My assembly lists a set of boot features:
>
>  <feature>aries-blueprint</feature>
>     <feature>bundle</feature>
>     <feature>config</feature>
>     <feature>diagnostic</feature>
>     <feature>feature</feature>
>     <feature>jaas</feature>
>     <feature>shell</feature>
>     <feature>log</feature>
>     <feature>management</feature>
>     <feature>package</feature>
>     <feature>shell-compat</feature>
>     <feature>ssh</feature>
>     <feature>system</feature>
>     <feature>wrap</feature>
>     <feature>jolokia</feature>
>     <feature>war</feature>
>     <feature>cxf-jaxrs</feature>
>     <feature>rosette-api</feature>
>     <feature>rosapi-common</feature>
>     <feature>rosapi-front-end-null-request-tracker</feature>
>     <feature>rosapi-front-end-anvils-transport</feature>
>     <feature>rosapi-front-end-service</feature>
>     <feature>rosapi-worker-service</feature>
>     <feature>rosapi-worker-dummy-sdk</feature>
> </bootFeatures>
>
> I want to add one component that uses DS, so I added
> <feature>scr</feature> into the list.
>
> When I start the assembled assembly, I get:
>
> As you will see at the bottom, the resulting environment is quite sad;
> it has no log commands.
>
>
>
> karaf@root>org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> : Error installing boot features
> org.apache.karaf.features.internal.util.MultiException: Error restarting bundles
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:844)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> 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)
> Suppressed: org.osgi.framework.BundleException: Activator start error
> in bundle org.ops4j.pax.url.wrap [149].
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2270)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1189)
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:836)
> ... 6 more
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482)
> at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
> at java.net.URL.toExternalForm(URL.java:922)
> at java.net.URL.toString(URL.java:908)
> at java.lang.ClassLoader.defineClassSourceLocation(ClassLoader.java:675)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
> at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
> at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1399)
> at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4471)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2215)
> ... 11 more
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> : Error installing boot features
> java.lang.NullPointerException
> at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)
> 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)
> log:display
> Command not found: log:display