karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Something wrong with FeatureDeploymentListener?
Date Sat, 15 Oct 2011 00:05:09 GMT
I'm having big problems with FeatureDeploymentListener.... it might be due to running with
osgi 4.3 frameworks and aries snapshots, but I doubt it.

First I saw corrupted FeatureDeploymentListener.cfg files (long sections of 0's) so I changed
the code to delete the file after reading it before rewriting it, then I got stack traces
like

2011-10-14 16:28:38,647 | ERROR | rint Extender: 3 | FeatureDeploymentListener        | atures.FeatureDeploymentListener
 168 | 22 - org.apache.karaf.deployer.features - 3.0.0.SNAPSHOT | Unable to install deployed
features for bundle: org.apache.servicemix.bundles.ant - 1.7.0.3
java.io.FileNotFoundException: /Users/david/projects/geronimo-git/geronimo/assemblies/geronimo-tomcat7-javaee6-web/target/geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT/data/cache/org.eclipse.osgi/bundles/22/data/FeatureDeploymentListener.cfg
(No such file or directory)
        at java.io.FileInputStream.open(Native Method)[:1.6.0_26]
        at java.io.FileInputStream.<init>(FileInputStream.java:120)[:1.6.0_26]
        at org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:146)
        at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_26]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_26]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:238)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:726)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:71)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_26]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_26]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:79)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:98)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:220)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:205)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:144)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:398)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:271)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:243)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:230)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:333)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:181)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:652)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:325)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:228)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[231:org.apache.aries.blueprint.core:0.3.2.SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_26]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_26]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_26]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_26]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_26]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
        at java.lang.Thread.run(Thread.java:680)[:1.6.0_26]

Replacing the synchronized (this) with synchronized (this.getClass()) removes these errors.
 My conclusion is that a lot of instances of this class are getting created by blueprint simultaneously.

Is this intended or is there something wrong in the blueprint configuration, such as prototype
rather than singleton scope?  (can't remember the right terms....)

thanks
david jencks
Mime
View raw message