| Problem when updating bundle programmatically [message #871207] |
Fri, 11 May 2012 08:57  |
Templier Thierry Messages: 2 Registered: May 2012 |
Junior Member |
|
|
Hello,
I installed a bundle programmatically using BundleContext.installBundle method. I put something like that for the bundle name (second parameter):
file://[...]/[bundleName]-[bundleVersion].jar
When I try then to update this bundle, it seems not to be correctly updated and I have a NoClassDefFoundError exception:
java.lang.NoClassDefFoundError: org/test/app/model/Test
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
at java.lang.Class.getDeclaredMethods(Class.java:1808)
[...]
Caused by: java.lang.ClassNotFoundException: org.test.app.model.Test
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 51 more
I put a trace in the getZipFile method of the SecureAction and Equinox tries to load the following file. It correspond to the updated bundle.
[...]/workspaces/.metadata/.plugins/org.eclipse.pde.core/New_configuration/org.eclipse.osgi/bundles/155/13/bundlefile
For information, if I stop and start Equinox, things work fine!
Are there some specific things to do in order to handle bundle updates?
Thanks,
Thierry
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02341 seconds