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.

Bug 199149

Summary: Custom components added to pallete via plugin are not loaded
Product: guibuilder Reporter: Michel Graciano <hmichel>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jkovalsky, misterm
Priority: P1    
Version: 7.0.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: The pallete UI correctly loaded for SwingX components using JDK 6
The pallete UI with problems whem using JDK 7
Log file with exceptions
New log file with exceptions
My user folder

Description Michel Graciano 2011-06-03 14:51:28 UTC
Created attachment 108705 [details]
The pallete UI correctly loaded for SwingX components using JDK 6

When I install our plugins which install some components those are not loaded correctly when using JDK 7. If I use JDK 6 everything is OK. To workaround the problem I need just reboot the IDE using JDK 6.

The effects of this is that our UIs can't be loaded beacause not just the components but the custom layouts are not loaded too. I will attach a couple of images to illustrate the problem.
Comment 1 Michel Graciano 2011-06-03 14:52:11 UTC
Created attachment 108706 [details]
The pallete UI with problems whem using JDK 7
Comment 2 Jan Stola 2011-06-04 08:07:50 UTC
I am sorry but it is impossible to track the problem down using just two screenshots. Could you, please, provide more details? Is some exception thrown (or at least printed into the console or message.log)?

Does this problem occur with your plugin only, i.e., are you able to install the same components into Palette manually?
Comment 3 Michel Graciano 2011-06-04 10:49:49 UTC
Created attachment 108719 [details]
Log file with exceptions

I will do more tests and send you more details. For now, I already have a log file with the exceptions. Sorry for the first poor bug description.
Comment 4 Michel Graciano 2011-06-04 11:02:42 UTC
Created attachment 108720 [details]
New log file with exceptions

I have started the IDE with a new userdir without import my settings from 7.0/6.9. I added the SwingX library and created the pallete, both steps manually and I got the same results, as you can see in this new log. I will attach my user folder soon.
Comment 5 Michel Graciano 2011-06-04 11:05:09 UTC
Created attachment 108721 [details]
My user folder

This is the userdir I user for last test. I hope this can help you to reproduce and fix it.
Comment 6 Jan Stola 2011-06-04 11:39:30 UTC
Thank you for the additional information. The component classes cannot be loaded because of the following exception:

java.lang.IllegalStateException: zip file closed
  at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632)
  at java.util.zip.ZipFile.getInputStream(ZipFile.java:345)
  at java.util.jar.JarFile.getInputStream(JarFile.java:403)
  at sun.net.www.protocol.jar.JarURLConnection.getInputStream
     (JarURLConnection.java:162)
  at sun.misc.URLClassPath$Loader$1.getInputStream(URLClassPath.java:553)
  at sun.misc.Resource.cachedInputStream(Resource.java:77)
  at sun.misc.Resource.getByteBuffer(Resource.java:160)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
  at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at org.openide.execution.NbClassLoader.findClass(NbClassLoader.java:212)
  at org.netbeans.api.java.classpath.ClassLoaderSupport.findClass
     (ClassLoaderSupport.java:118)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
  at org.netbeans.modules.form.project.ClassPathUtils.loadClass
     (ClassPathUtils.java:180)
[catch] at org.netbeans.modules.form.palette.PaletteItem.loadComponentClass
     (PaletteItem.java:274)
     ...

The exception seems to be a regression in JDK 7, see issue 196716.

*** This bug has been marked as a duplicate of bug 196716 ***