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 <[email protected]>:

> 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 <[email protected]>
> 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 <[email protected]>:
> >>
> >> 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 <[email protected]
> >
> >> 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 <[email protected]>:
> >> >>
> >> >> 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 <
> [email protected]>
> >> >> 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

Reply via email to