This is a strange error indeed.
I looked into the source at the trace position and it seems to happen if
this is null:
NamespaceHandler handler = (NamespaceHandler)
bundleContext.getService(reference);
The error then occurs in writing the warning. So the first thing we
should do is fix the logging so at least this works. Still it is strange
as the above condition should not occur at all.
I am not sure how the whole error condition can happen. One possibility
is that the installation of eventadmin might cause it. We had lots of
problems when eventadmin
is installed in karaf 4 as it causes the whole feature service to
restart. So normally eventadmin should already be in the
startup.properties. So you could try to not install it.
Can you try to do all these installs in one command? The feature service
behaves much better if it gets the full list of features. As the
resolution is better optimized then it will cause less bundle refreshs.
So after all the problem could happen if blueprint transaction is
restarted. I will test this manually to see if I can reproduce.
I just tested the install commands you gave about ten times but was not
able to see the error. Still possible of course that I just miss it on
my machine if it is a timing problem.
I also did an update on the blueprint transaction bundle several times
to see if this causes the error but that also did not work.
Christian
On 11.11.2015 09:27, ellirael wrote:
I have found some unstable behavior when starting Karaf 4.0.3.
Apache Aries Transaction Blueprint 2.0.0 bundle start success is random.
I have to restart Karaf several (about 3 to 10) times to get the error.
It looks like it is some sort of a bundle race or something.
*The list of features to be installed:*
feature:install -v eventadmin/${version};
feature:install -v http-whiteboard/${version};
feature:install -v jdbc/${version};
feature:install -v pax-jdbc-pool-dbcp2/0.7.0;
feature:install -v eclipselink/2.6.0;
feature:install -v jpa/2.2.0;
*Exception during Karaf start:*
karaf@root()> ERROR: Bundle org.apache.aries.blueprint.core [13]
EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.addingService(NamespaceHandlerRegistryImpl.java:126)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
at
org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
at org.apache.felix.framework.Felix.registerService(Felix.java:3549)
at
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:459)
at
org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:193)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:710)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:385)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:270)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at
org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
*Cut from bundle:list command result:*
108 | Active | 80 | 1.2 | javax.interceptor API
109 | Active | 80 | 1.2 | javax.transaction API
110 | Active | 80 | 1.1.1 | Apache Aries Transaction
Blueprint
111 | Failure | 80 | 2.0.0 | Apache Aries Transaction
Blueprint
112 | Active | 80 | 1.3.0 | Apache Aries Transaction
Manager
*Diag command result for problem bundle:*
Apache Aries Transaction Blueprint (111)
----------------------------------------
Status: Failure
Blueprint
11.11.15 12:06
Exception:
Service already unregistered.
java.lang.IllegalStateException: Service already unregistered.
at
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:140)
at
org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:195)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:710)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:385)
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:270)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at
org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
--
View this message in context:
http://karaf.922171.n3.nabble.com/Problems-with-Apache-Aries-Transaction-Blueprint-bundle-start-in-Karaf-4-0-3-tp4043420.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com