Hello Richard,
thanks for your quick reply.
I guess it was my misstake: my OBR client holds a list of resources to
download. After the first pass
of downloading an installing Bundles, I forgot to clear this list.
So the next time adding a new Bundle to download list he downloads all
the other bundles downloaded before again
+ the new one.
So it is also clear why OBR's resolve mechanism doesn't produce this
problem.
So for now my problem is solved. But there is one thing I wonder about:
downloading the same bundles again shouldn't lead fileinstall to
produce such problems. FileInstall reacts
to the double installation with an update, which is OK, but why iPOJO
instances can't be created / why can't the bundles start again.
And what means "Invalid BundleContext" in this situation?
regards
Matthias
Am 19.11.2009 um 16:28 schrieb Richard S. Hall:
On 11/19/09 10:05, Matthias Neubert wrote:
Hello,
I use the following setup:
Felix 2.01 (embedded in Android App.)
iPOJO 1.40
File Install 2.04
OBR 1.42
For dynamic deployment I used a combination between
FileInstall and OBR. I use OBR die resolve all needed Bundles for
the selected ones. Then I
use the URLs of the resolved Resources to download the Bundle Jars
to a directory.
This directory is watched by FileInstall, so FileInstall does the
rest of the deployment.
In most cases this works good. But I found the following scenario
in which I ran into great problems, and I don't know why.
If I use OBR's own deployment without fileinstall everything works.
If I dont use OBR and just copy the Bundle Jars into the file
install watched directory, everything works fine
BUT IF:
1. I use OBR+FileInstall to download an install the most of my
bundles. There are Bundes with Service Interfaces, and others with
the implementation
of this service interfaces. I usually have some implementing
Bundles which implement the same service interface.
Exp: ServiceInterface "AInt" in Bundle IA and Bundle A which
implements "AInt" is downloaded and installed.
2. then I use the new installed bundles
3. here comes the problem: If I use OBR+Fileinstall again to
download and install Bundle B, which also implements "AInt" from
Bundle IA,
all Bundles get "updated" (automatically stopped first, then
updates, the restarted)
Are you sure only Bundle B is getting downloaded or are you
downloading all of the bundles again from OBR?
-> richard
After that I receive plenty iPOJO Error warnings the instanciation
failed because of an "Invalid BundleContext". See error log for
details.
-> this leeds to all Bundles doesn't work anymore (except the
standard OSGi Bundles ipojo, fileisntall etc., but all that updated
bundles of mine don't work.
It would be fine if someone looks at this, or gives me a hint where
the reason for the problem is
regards
Matthias
Here the error log:
11-19 12:29:05.551: WARN/System.err(795):
java.util.ConcurrentModificationException
11-19 12:29:05.561: WARN/System.err(795): at java.util.HashMap
$HashIterator.nextEntry(HashMap.java:778)
11-19 12:29:05.561: WARN/System.err(795): at java.util.HashMap
$KeyIterator.next(HashMap.java:805)
11-19 12:29:05.561: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.InstanceCreator.removeInstancesFromBundle(InstanceCreator.java:117)
11-19 12:29:05.561: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.closeManagementFor(Extender.java:147)
11-19 12:29:05.561: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.bundleChanged(Extender.java:129)
11-19 12:29:05.571: WARN/System.err(795): at
org
.apache
.felix
.framework
.util
.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:
800)
11-19 12:29:05.571: WARN/System.err(795): at
org
.apache
.felix
.framework
.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
11-19 12:29:05.571: WARN/System.err(795): at
org
.apache
.felix
.framework
.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
11-19 12:29:05.571: WARN/System.err(795): at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3576)
11-19 12:29:05.571: WARN/System.err(795): at
org.apache.felix.framework.Felix.stopBundle(Felix.java:2061)
11-19 12:29:05.581: WARN/System.err(795): at
org.apache.felix.framework.Felix.updateBundle(Felix.java:1817)
11-19 12:29:05.581: WARN/System.err(795): at
org.apache.felix.framework.BundleImpl.update(BundleImpl.java:933)
11-19 12:29:05.591: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:
947)
11-19 12:29:05.591: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:
751)
11-19 12:29:05.591: WARN/System.err(795): at
org
.apache
.felix
.fileinstall
.internal.DirectoryWatcher.process(DirectoryWatcher.java:383)
11-19 12:29:05.591: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:206)
11-19 12:29:06.212: WARN/System.err(795): [ERROR]
de.mnsoft.mapprovider.gmapsimpl.MapProviderServiceImpl : Invalid
BundleContext.
11-19 12:29:06.222: WARN/System.err(795):
java.lang.IllegalStateException: Invalid BundleContext.
11-19 12:29:06.222: WARN/System.err(795): at
org
.apache
.felix
.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:
393)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:
92)
11-19 12:29:06.232: WARN/System.err(795): at
org.apache.felix.ipojo.IPojoContext.getBundle(IPojoContext.java:202)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.__setSpecification(DependencyHandler.java:294)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.setSpecification(DependencyHandler.java)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.__checkDependency(DependencyHandler.java:202)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.checkDependency(DependencyHandler.java)
11-19 12:29:06.232: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.__configure(DependencyHandler.java:426)
11-19 12:29:06.242: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.configure(DependencyHandler.java)
11-19 12:29:06.254: WARN/System.err(795): at
org.apache.felix.ipojo.HandlerManager.init(HandlerManager.java:73)
11-19 12:29:06.254: WARN/System.err(795): at
org
.apache.felix.ipojo.InstanceManager.configure(InstanceManager.java:
183)
11-19 12:29:06.254: WARN/System.err(795): at
org
.apache
.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:
154)
11-19 12:29:06.254: WARN/System.err(795): at
org
.apache
.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:
298)
11-19 12:29:06.262: WARN/System.err(795): at
org
.apache
.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:
235)
11-19 12:29:06.262: WARN/System.err(795): at
org.apache.felix.ipojo.InstanceCreator
$ManagedInstance.create(InstanceCreator.java:360)
11-19 12:29:06.262: WARN/System.err(795): at
org
.apache
.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
11-19 12:29:06.262: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.parse(Extender.java:269)
11-19 12:29:06.262: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
11-19 12:29:06.271: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
11-19 12:29:06.271: WARN/System.err(795): at
org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)
11-19 12:29:06.271: WARN/System.err(795): at
java.lang.Thread.run(Thread.java:1096)
11-19 12:29:06.271: WARN/System.err(795): [ERROR]
de.mnsoft.mapprovider.gmapsimpl.MapProviderServiceImpl : Invalid
BundleContext.
11-19 12:29:06.282: WARN/System.err(795): [ERROR] iPOJO Instance
Creator : A matching factory was found for
{instance
.name=de.mnsoft.mapprovider.gmapsimpl.MapProviderServiceImpl-0,
component=de.mnsoft.mapprovider.gmapsimpl.MapProviderServiceImpl},
but the instantiation failed : The configuration is not correct for
the type de.mnsoft.mapprovider.gmapsimpl.MapProviderServiceImpl :
Invalid BundleContext.
11-19 12:29:14.122: WARN/System.err(795):
java.util.ConcurrentModificationException
11-19 12:29:14.132: WARN/System.err(795): at java.util.HashMap
$HashIterator.nextEntry(HashMap.java:778)
11-19 12:29:14.132: WARN/System.err(795): at java.util.HashMap
$KeyIterator.next(HashMap.java:805)
11-19 12:29:14.132: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.InstanceCreator.removeInstancesFromBundle(InstanceCreator.java:117)
11-19 12:29:14.142: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.closeManagementFor(Extender.java:147)
11-19 12:29:14.142: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.bundleChanged(Extender.java:129)
11-19 12:29:14.152: WARN/System.err(795): at
org
.apache
.felix
.framework
.util
.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:
800)
11-19 12:29:14.152: WARN/System.err(795): at
org
.apache
.felix
.framework
.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
11-19 12:29:14.152: WARN/System.err(795): at
org
.apache
.felix
.framework
.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
11-19 12:29:14.152: WARN/System.err(795): at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3576)
11-19 12:29:14.152: WARN/System.err(795): at
org.apache.felix.framework.Felix.stopBundle(Felix.java:2061)
11-19 12:29:14.162: WARN/System.err(795): at
org.apache.felix.framework.Felix.updateBundle(Felix.java:1817)
11-19 12:29:14.162: WARN/System.err(795): at
org.apache.felix.framework.BundleImpl.update(BundleImpl.java:933)
11-19 12:29:14.162: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:
947)
11-19 12:29:14.162: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:
751)
11-19 12:29:14.172: WARN/System.err(795): at
org
.apache
.felix
.fileinstall
.internal.DirectoryWatcher.process(DirectoryWatcher.java:383)
11-19 12:29:14.172: WARN/System.err(795): at
org
.apache
.felix
.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:206)
11-19 12:29:14.691: WARN/System.err(795): [ERROR]
de
.mnsoft
.mapserviceviewer
.appstarter.MapServiceViewerAppStarterServiceImpl : Invalid
BundleContext.
11-19 12:29:14.701: WARN/System.err(795):
java.lang.IllegalStateException: Invalid BundleContext.
11-19 12:29:14.701: WARN/System.err(795): at
org
.apache
.felix
.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:
393)
11-19 12:29:14.701: WARN/System.err(795): at
org
.apache
.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:
92)
11-19 12:29:14.711: WARN/System.err(795): at
org.apache.felix.ipojo.IPojoContext.getBundle(IPojoContext.java:202)
11-19 12:29:14.721: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.__setSpecification(DependencyHandler.java:294)
11-19 12:29:14.721: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.setSpecification(DependencyHandler.java)
11-19 12:29:14.721: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency
.DependencyHandler.__checkDependency(DependencyHandler.java:202)
11-19 12:29:14.721: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.checkDependency(DependencyHandler.java)
11-19 12:29:14.721: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.__configure(DependencyHandler.java:426)
11-19 12:29:14.731: WARN/System.err(795): at
org
.apache
.felix
.ipojo
.handlers
.dependency.DependencyHandler.configure(DependencyHandler.java)
11-19 12:29:14.731: WARN/System.err(795): at
org.apache.felix.ipojo.HandlerManager.init(HandlerManager.java:73)
11-19 12:29:14.761: WARN/System.err(795): at
org
.apache.felix.ipojo.InstanceManager.configure(InstanceManager.java:
183)
11-19 12:29:14.761: WARN/System.err(795): at
org
.apache
.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:
154)
11-19 12:29:14.761: WARN/System.err(795): at
org
.apache
.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:
298)
11-19 12:29:14.771: WARN/System.err(795): at
org
.apache
.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:
235)
11-19 12:29:14.771: WARN/System.err(795): at
org.apache.felix.ipojo.InstanceCreator
$ManagedInstance.create(InstanceCreator.java:360)
11-19 12:29:14.771: WARN/System.err(795): at
org
.apache
.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
11-19 12:29:14.771: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.parse(Extender.java:269)
11-19 12:29:14.771: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
11-19 12:29:14.781: WARN/System.err(795): at
org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
11-19 12:29:14.781: WARN/System.err(795): at
org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)
11-19 12:29:14.791: WARN/System.err(795): at
java.lang.Thread.run(Thread.java:1096)
11-19 12:29:14.791: WARN/System.err(795): [ERROR]
de
.mnsoft
.mapserviceviewer
.appstarter.MapServiceViewerAppStarterServiceImpl : Invalid
BundleContext.
11-19 12:29:14.811: WARN/System.err(795): [ERROR] iPOJO Instance
Creator : A matching factory was found for
{instance
.name
=
de
.mnsoft
.mapserviceviewer
.appstarter.MapServiceViewerAppStarterServiceImpl-0,
component
=
de
.mnsoft
.mapserviceviewer
.appstarter.MapServiceViewerAppStarterServiceImpl}, but the
instantiation failed : The configuration is not correct for the
type
de
.mnsoft
.mapserviceviewer
.appstarter.MapServiceViewerAppStarterServiceImpl : Invalid
BundleContext.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]