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 - Custom components added to pallete via plugin are not loaded
Summary: Custom components added to pallete via plugin are not loaded
Status: RESOLVED DUPLICATE of bug 196716
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 14:51 UTC by Michel Graciano
Modified: 2011-06-04 11:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The pallete UI correctly loaded for SwingX components using JDK 6 (33.82 KB, image/png)
2011-06-03 14:51 UTC, Michel Graciano
Details
The pallete UI with problems whem using JDK 7 (31.44 KB, image/png)
2011-06-03 14:52 UTC, Michel Graciano
Details
Log file with exceptions (160.49 KB, application/octet-stream)
2011-06-04 10:49 UTC, Michel Graciano
Details
New log file with exceptions (329.78 KB, application/octet-stream)
2011-06-04 11:02 UTC, Michel Graciano
Details
My user folder (154.31 KB, application/octet-stream)
2011-06-04 11:05 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***