This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Seen on a NetBeans platform based application: A NPE is thrown during application startup in org.netbeans.JarClassLoader$ResURLConnection.getJarFile(JarClassLoader.java:758). It is triggered during ModuleInstall code trying to open a url to read a ressource. The problem cause seems to be that src.jar is accessed directly before it is lazy initialized via src.getJarFile().
I need a self-contained minimal test case please, not to mention a complete stack trace.
Created attachment 62411 [details] Stcktrace
Since I have difficulties reproducing it, I think all I can give you actually is the stacktrace I just attached. Any reason why you chose to access src.jar directly and not via src.getJarFile()?
getJarFile has various side effects I don't think I want here. I think new JarFile(src.file) should work however. core-main #2838c2a7bef3
Ok. Thanks for your fast response. I will try your fix and put the problem under our internal observation and let you know if it works.
Great. In the next day or two you should see a notification that the fix has appeared in a nightly build. If you manage to test the fix, you can either "Reopen issue" or "Mark issue as VERIFIED" according to the result.
Integrated into 'main-golden', available in NB_Trunk_Production #240 build Changeset: http://hg.netbeans.org/main/rev/2838c2a7bef3 User: Jesse Glick <jglick@netbeans.org> Log: #136536: NPE calling getJarFile() under obscure conditions.
Works for me with latest changes. Thanks.