Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Problem when updating bundle programmatically
Problem when updating bundle programmatically [message #871207] Fri, 11 May 2012 12:57 Go to next message
Templier Thierry is currently offline Templier ThierryFriend
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
Re: Problem when updating bundle programmatically [message #871212 is a reply to message #871207] Fri, 11 May 2012 13:15 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
What you describe sounds like a bug of some sorts. How are you updating specifically? Are you calling Bundle.update(InputStream) with an input stream to the new content or just calling Bundle.update() with no arguments?

It may be best for you to open a bug with specific steps to reproduce.

Tom
Re: Problem when updating bundle programmatically [message #871220 is a reply to message #871212] Fri, 11 May 2012 13:32 Go to previous message
Templier Thierry is currently offline Templier ThierryFriend
Messages: 2
Registered: May 2012
Junior Member
Hello Tom,

Thanks very much for your answer!

I use the update method with an input stream as parameter... I'll open a bug for that problem.

Thierry
Previous Topic:Plugins IU directly in category.xml
Next Topic:Updating to 3.6.2 removes my branding
Goto Forum:
  


Current Time: Thu Apr 25 03:46:10 GMT 2024

Powered by FUDForum. Page generated in 0.04082 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top