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 227204 - NullPointerException at org.netbeans.modules.form.RADVisualContainer.getContainerDelegate
Summary: NullPointerException at org.netbeans.modules.form.RADVisualContainer.getConta...
Status: RESOLVED DUPLICATE of bug 127881
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 241358 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-08 11:00 UTC by js-java
Modified: 2014-02-04 09:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199424


Attachments
stacktrace (3.99 KB, text/plain)
2013-03-08 11:00 UTC, js-java
Details

Note You need to log in before you can comment on or make changes to this bug.
Description js-java 2013-03-08 11:00:35 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 7

User Comments:
js-java: Open GridBagLayout editor.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.RADVisualContainer.getContainerDelegate(RADVisualContainer.java:237)
   at org.netbeans.modules.form.layoutsupport.griddesigner.GridDesigner.setDesignedContainer(GridDesigner.java:232)
   at org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport.getSupportCustomizer(GridBagLayoutSupport.java:121)
   at org.netbeans.modules.form.layoutsupport.LayoutSupportManager.getSupportCustomizer(LayoutSupportManager.java:509)
   at org.netbeans.modules.form.layoutsupport.LayoutNode.createCustomizer(LayoutNode.java:139)
   at org.netbeans.modules.form.FormNode.getCustomizer(FormNode.java:145)
Comment 1 js-java 2013-03-08 11:00:39 UTC
Created attachment 132375 [details]
stacktrace
Comment 2 Tomas Pavek 2014-01-16 14:00:31 UTC
The exception is caused by failure in cloning the container which fails on creating a new instance of JXSearchField component from SwingX. It looks like some expected UI defaults are missing. Exception found in the log:

java.lang.NullPointerException
	at org.jdesktop.swingx.JXSearchField.customSetUIProperty(JXSearchField.java:751)
	at org.jdesktop.swingx.JXSearchField.customSetUIProperty(JXSearchField.java:729)
	at org.jdesktop.swingx.plaf.SearchFieldUI.installDefaults(SearchFieldUI.java:217)
	at org.jdesktop.swingx.plaf.SearchFieldUI.installUI(SearchFieldUI.java:73)
	at javax.swing.JComponent.setUI(JComponent.java:664)
	at javax.swing.text.JTextComponent.setUI(JTextComponent.java:338)
	at org.jdesktop.swingx.plaf.TextUIWrapper.replaceUIIfNeeded(TextUIWrapper.java:67)
	at org.jdesktop.swingx.plaf.TextUIWrapper$DefaultWrapper.replaceUIIfNeeded(TextUIWrapper.java:159)
	at org.jdesktop.swingx.plaf.TextUIWrapper.install(TextUIWrapper.java:49)
	at org.jdesktop.swingx.prompt.PromptSupport.setPrompt(PromptSupport.java:180)
	at org.jdesktop.swingx.prompt.PromptSupport.init(PromptSupport.java:114)
	at org.jdesktop.swingx.JXTextField.<init>(JXTextField.java:38)
	at org.jdesktop.swingx.JXTextField.<init>(JXTextField.java:33)
	at org.jdesktop.swingx.JXTextField.<init>(JXTextField.java:29)
	at org.jdesktop.swingx.JXSearchField.<init>(JXSearchField.java:174)
	at org.jdesktop.swingx.JXSearchField.<init>(JXSearchField.java:164)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at java.lang.Class.newInstance0(Class.java:374)
	at java.lang.Class.newInstance(Class.java:327)
	at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:178)
	at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:252)
[catch] at org.netbeans.modules.form.RADComponent.cloneBeanInstance(RADComponent.java:421)
	at org.netbeans.modules.form.VisualReplicator.cloneComponent(VisualReplicator.java:703)
...

This looks like bug 127881 - lost UI defaults for SwingX components due to changed classloader. A workaround should be to reopen the GUI form.

*** This bug has been marked as a duplicate of bug 127881 ***
Comment 3 Tomas Pavek 2014-02-04 09:54:34 UTC
*** Bug 241358 has been marked as a duplicate of this bug. ***