You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by oski_bear <da...@hotmail.com> on 2016/09/09 04:48:53 UTC

Inconsisent behavior during Karaf 4.0.5 startup

Here's another series of errors that occurs inconsistently at startup with
Karaf 4.0.5

karaf@root>ERROR: Bundle org.eclipse.jetty.plus [157] Error starting
mvn:org.eclipse.jetty/jetty-plus/9.2.15.v20160210
(org.osgi.framework.BundleException: Unable to resolve
org.eclipse.jetty.plus [157](R 157.0): missing requirement
[org.eclipse.jetty.plus [157](R 157.0)] osgi.wiring.package;
(&(osgi.wiring.package=javax.transaction)(version>=1.1.0)(!(version>=1.3.0)))
Unresolved requirements: [[org.eclipse.jetty.plus [157](R 157.0)]
osgi.wiring.package;
(&(osgi.wiring.package=javax.transaction)(version>=1.1.0)(!(version>=1.3.0)))])
org.osgi.framework.BundleException: Unable to resolve org.eclipse.jetty.plus
[157](R 157.0): missing requirement [org.eclipse.jetty.plus [157](R 157.0)]
osgi.wiring.package;
(&(osgi.wiring.package=javax.transaction)(version>=1.1.0)(!(version>=1.3.0)))
Unresolved requirements: [[org.eclipse.jetty.plus [157](R 157.0)]
osgi.wiring.package;
(&(osgi.wiring.package=javax.transaction)(version>=1.1.0)(!(version>=1.3.0)))]
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
	at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
	at java.lang.Thread.run(Thread.java:745)
ERROR: Bundle org.apache.geronimo.specs.geronimo-jta_1.1_spec [114] Unable
to remove bundle from installed map!

ERROR: Bundle org.apache.geronimo.specs.geronimo-jta_1.1_spec [114] Unable
to remove mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
(java.lang.NullPointerException)
java.lang.NullPointerException
	at
org.apache.felix.framework.BundleRevisionImpl.close(BundleRevisionImpl.java:668)
	at
org.apache.felix.framework.BundleImpl.closeRevisions(BundleImpl.java:175)
	at
org.apache.felix.framework.BundleImpl.closeAndDelete(BundleImpl.java:158)
	at
org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:4909)
	at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:719)
	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2610)
	at org.apache.felix.framework.Felix$2.run(Felix.java:1032)
	at java.lang.Thread.run(Thread.java:745)
The specified feature: 'example-prerequisites' version '2.0.1.SNAPSHOT' is
already installed


One interesting side effect of this error is that the features core bundle
is left in a resolved state:

karaf@root>la | grep -i feature
 11 | Resolved |  15 | 4.0.5              | Apache Karaf :: Features :: Core
121 | Active   |  26 | 4.0.5              | Apache Karaf :: Deployer ::
Features
125 | Active   |  30 | 4.0.5              | Apache Karaf :: Features ::
Command

If I manually start the the bundle, things seem to proceed OK and finish
loading just fine.
1. Is there a way to effectively troubleshoot this kind of nondeterministic
behavior?
2. Is there a way for me to explicitly state exactly in what order I want
the container to load prerequisite features that produces consistent
behavior?

Thanks



--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsisent-behavior-during-Karaf-4-0-5-startup-tp4047933.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Inconsisent behavior during Karaf 4.0.5 startup

Posted by oski_bear <da...@hotmail.com>.
Here is a snippet from the log that might be relevant

2016-09-08 21:52:42,941 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 | Changes to perform:
2016-09-08 21:52:42,945 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |   Region: root
2016-09-08 21:52:42,945 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |     Bundles to install:
2016-09-08 21:52:42,945 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |      
mvn:com.example.auth/pki-data/2.0.1.SNAPSHOT
2016-09-08 21:52:42,945 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |      
mvn:com.example.auth/pki-data-h2/2.0.1.SNAPSHOT
2016-09-08 21:52:42,946 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |      
mvn:org.osgi/org.osgi.service.jdbc/1.0.0
2016-09-08 21:52:42,946 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 | Stopping bundles:
2016-09-08 21:52:42,950 | INFO  | ool-188-thread-1 | FeaturesServiceImpl             
| 11 - org.apache.karaf.features.core - 4.0.5 |  
org.apache.karaf.features.core/4.0.5
2016-09-08 21:52:42,970 | INFO  | ool-188-thread-1 | CommandExtension                
| 138 - org.apache.karaf.shell.core - 4.0.5 | Unregistering commands for
bundle org.apache.karaf.features.command/4.0.5
2016-09-08 21:52:43,032 | WARN  | ool-177-thread-1 | Activator                       
| 11 - org.apache.karaf.features.core - 4.0.5 | Error starting activator
java.lang.IllegalStateException: Invalid BundleContext.
        at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)[org.apache.felix.framework-5.4.0.jar:]
        at
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)[org.apache.felix.framework-5.4.0.jar:]
        at
org.apache.karaf.util.tracker.BaseActivator.registerMBean(BaseActivator.java:290)[11:org.apache.karaf.features.core:4.0.5]
        at
org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:264)[11:org.apache.karaf.features.core:4.0.5]
        at
org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:233)[11:org.apache.karaf.features.core:4.0.5]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
2016-09-08 21:52:43,049 | INFO  | ool-236-thread-2 | CommandExtension                
| 138 - org.apache.karaf.shell.core - 4.0.5 | Unregistering commands for
bundle org.apache.karaf.kar.core/4.0.5

Afterward there are no more messages from FeaturesServiceImpl and the bundle
is left in the resolved state. If I manually start the bundle I see the
Karaf branding page again and all the features load properly. Is this a
feature installer bug? How can I troubleshoot this?



--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsisent-behavior-during-Karaf-4-0-5-startup-tp4047933p4047934.html
Sent from the Karaf - User mailing list archive at Nabble.com.