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 221685 - NoClassDefFoundError inserting bean
Summary: NoClassDefFoundError inserting bean
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 22:52 UTC by Chiana
Modified: 2012-11-08 16:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log's from beta-2 (21.83 KB, application/x-zip-compressed)
2012-11-08 13:11 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2012-11-07 22:52:47 UTC
[ JDK VERSION : 1.7.7 ]

When trying to insert a bean either by dragging it from the projects window or
using "choose bean" in the palette the following error occurs, this is a severe
regression since this has worked before.
java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at
org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:1
14)
	at
org.netbeans.modules.form.MetaComponentCreator$5.run(MetaComponentCreator.java:1
353)
	at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
	at org.openide.util.Mutex.readAccess(Mutex.java:322)
	at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
	at
org.netbeans.modules.form.MetaComponentCreator.prepareClass(MetaComponentCreator
.java:1349)
	at
org.netbeans.modules.form.HandleLayer$NewComponentDropListener.dragEnter(HandleL
ayer.java:3536)
	at java.awt.dnd.DropTarget.dragEnter(DropTarget.java:357)
	at
sun.awt.dnd.SunDropTargetContextPeer.processEnterMessage(SunDropTargetContextPee
r.java:330)
	at
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEnterEvent(SunDropT
argetContextPeer.java:798)
	at
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTarget
ContextPeer.java:766)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
	at java.awt.Component.dispatchEventImpl(Component.java:4716)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4620)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4558)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4417)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:682)
	at java.awt.EventQueue$3.run(EventQueue.java:680)
	at java.security.AccessController.doPrivileged(Native Method)
	at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:7
6)
	at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:8
7)
	at java.awt.EventQueue$4.run(EventQueue.java:696)
	at java.awt.EventQueue$4.run(EventQueue.java:694)
	at java.security.AccessController.doPrivileged(Native Method)
	at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:7
6)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
	at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244
)
	at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151
)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: java.lang.ClassNotFoundException: Will not load class
org.jdesktop.layout.GroupLayout$Group arbitrarily from one of
ModuleCL@47c0db6a[org.jdesktop.layout] and
ModuleCL@2ca817f3[org.netbeans.libs.ppawtlayout] starting from
SystemClassLoader[712 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:204)
	at
org.netbeans.ModuleManager$SystemClassLoader.loadClass(ModuleManager.java:713)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at
org.netbeans.modules.form.project.ProjectClassLoader.findClass(ProjectClassLoade
r.java:123)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 44 more
Comment 1 Chiana 2012-11-08 12:42:59 UTC
I rechecked the beta-2, this problem is there too...

It seems however that it will only occur when the bean is not in the same package as the form it is inserted into.
Comment 2 David Strupl 2012-11-08 12:58:34 UTC
I am checking the changes in NB code that could have caused this ... stay tuned.
Comment 3 David Strupl 2012-11-08 12:59:55 UTC
BTW can you please attach your messages.log file so I can see what modules in what version you have installed? Thanks.
Comment 4 Chiana 2012-11-08 13:03:07 UTC
Good, too bad I didn't see it earlier, it would have made a NoGo on the beta...

I have the messages.log here from the beta test, but I don't have from the latest build i my work computer, they are at home, but I will make a "clean" test with the beta and upload that log.
Comment 5 David Strupl 2012-11-08 13:06:29 UTC
Ok, thanks a lot.

In my Beta2 installation I have only the first one enabled from

org.jdesktop.layout
org.netbeans.libs.ppawtlayout

I am just wondering from where the second is coming. Did you upgrade or started from fresh without importing anything?
Comment 6 Chiana 2012-11-08 13:11:27 UTC
Created attachment 127397 [details]
Log's from beta-2

The Dev build was an upgrade in that sense that I uninstalled the old version and the made a new install with the newer version using administrative privileges. The beta-2 was a clean install with a fresh JDK installation (.9)

I do note that the error occurs when mouse pointer get's over the form when dragging from the projects window and immediatley upon pressing enter when using select bean tool.
Comment 7 David Strupl 2012-11-08 13:25:08 UTC
So the difference is that I did not have the full distro. Seems like the ppawtlayout is from the mobility support. Continuing in investigation.
Comment 8 David Strupl 2012-11-08 15:19:05 UTC
If you want to work with Beta2 please disable all JavaME modules (when working with form files).

We will fix this in the trunk.
Comment 9 Chiana 2012-11-08 15:48:09 UTC
Oki, I really need to do some work on my shopapplication for the moment, fixing a few bugs and implementing a few new bugs B-)
But if disabling mobile functions will do the trick I'm quite sure that the mobile part of it can wait a while while this is beeing fixed. Shall we leave this bug as a P1 for now then?
Comment 10 Jan Stola 2012-11-08 16:16:55 UTC
Steps to reproduce:
1. Start full IDE.
2. Make sure Java ME is activated
   (see Tools > Plugins, Java ME features on Installed tab)
3. Create new JPanel form.
4. Select root node (of the form) in Navigator.
5. Go to Properties window and change Layout Generation Style
   to Swing Layout Extensions Library.
6. Save JPanel and rebuild its project.
7. Create new JFrame form.
8. Try to add the panel form created in the previous steps into the JFrame.
   (for example, try to drag and drop the corresponding node in Projects view
    into the designer area of the JFrame)
   => the mentioned exception is thrown.
Comment 11 Jan Stola 2012-11-08 16:24:13 UTC
We encountered this problem in the past, see issue 135745. We resolved it by loading org.jdesktop.layout classes from the class-loader of the form module. Unfortunately, this hack no longer works because form module was split into several modules and org.jdesktop.layout classes are no longer on the classpath of form module. They are on the classpath of form.nb module instead. We have to update our hack to match the new location of the classes.
Comment 12 Jan Stola 2012-11-08 16:59:00 UTC
Fixed - org.jdesktop.layout classes are no longer loaded using the class-loader of form module. The class-loader of the implementation of FormServices is used instead.

Modified file: http://hg.netbeans.org/web-main/rev/db1a78d0446c