Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » occasional NPE when getting resouce from bundle
occasional NPE when getting resouce from bundle [message #510218] Tue, 26 January 2010 18:22 Go to next message
Lukas Zaruba is currently offline Lukas ZarubaFriend
Messages: 8
Registered: January 2010
Junior Member
Hi,
I have recently run into the problem while trying to load various resources from the bundle. My application has something about 40 plugins and recently exceptions while loading resources started to occur. It is occasional and sometimes when I try to load it for the second time it succeeds.
It happens in the biggest plugin which contains something about 3000 resources (classes, images, xmls etc.) Other plugins seem to work fine. I have spotted this behavior on the Linux 32-bit and 64-bit (more often). Java JRE is 1.6.0_16/18 tried both.
Sometimes problem occurs when classloader tries to load class sometimes it is resource obtained by Platform.getBundle(BUNDLE_ID).getResource("img/rotateRight.gif "). I am attaching one of the many stack traces.

(I'd like to add that problem is not always in the ensure open, but sometimes in the inflateBytes(native) and many others, but always it is in the java.util.zip.Inflater class)

Do anybody have any clue where the problem can be or where else to ask? This is really a huge issue for us. Application is just before release Sad

Thanks in advance.

Lukas

Caused by: java.lang.NullPointerException
at java.util.zip.Inflater.ensureOpen(Unknown Source)
at java.util.zip.Inflater.reset(Unknown Source)
at java.util.zip.ZipFile.releaseInflater(Unknown Source)
at java.util.zip.ZipFile.access$000(Unknown Source)
at java.util.zip.ZipFile$1.close(Unknown Source)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleEntry$ZipBu ndleEntryInputStream.close(ZipBundleEntry.java:131)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry.getBytes (BundleEntry.java:128)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:533)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:477)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:465)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:445)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:211)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:376)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:452)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:405)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:393)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(Unknown Source)
Re: occasional NPE when getting resouce from bundle [message #510234 is a reply to message #510218] Tue, 26 January 2010 19:51 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You might be hitting
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193269 the symptom is NPEs
from zip.Inflater

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: occasional NPE when getting resouce from bundle [message #510239 is a reply to message #510234] Tue, 26 January 2010 20:16 Go to previous message
Lukas Zaruba is currently offline Lukas ZarubaFriend
Messages: 8
Registered: January 2010
Junior Member
Thank you, this seems to be the exact problem. What I didn't mention is that I use Jetty to serve some content of this bundle and there is the note in the bug that refers to the construction in the Jetty webserver that causes the issue. I will give a try to the suggestions in the note and I will post my results in here so anybody who is using Jetty and faces the same problem can follow my steps Smile .

Thanks again

Lukas
Previous Topic:ContainerSelectionDialog - can I show hidden folders?
Next Topic:IMarker handle leak?
Goto Forum:
  


Current Time: Thu Apr 25 23:52:29 GMT 2024

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

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

Back to the top