Re: Matisse is throwing exception until I restart NetBeans

Tomas Pavek <[email protected]>
Newsgroups gmane.comp.java.netbeans.user-interface
Message-ID <[email protected]>
[Please post reports like this rather to nbusers mailing list... Thanks]

The exception you attached is probably caused by a bug in the GUI builder 
(would be worth reporting in IssueZilla), however it is caused but another 
exception - DataPicker component fails on instantiation (thus the layout 
loading fails).

When you compile the other form and reopen the WizytyForm form, a new 
classloader is used to load the classes - so new version of DataPicker class 
is loaded, but it probably interacts with the old version of the 
BasicDatePickerUI. If you restart, everything seems ok - when the class is 
loaded first time.

Would be good to investigate why this happens... especially the 
CalendarPane.updateUI method - how it gets the UI delegate.

   - Tomas


java.lang.ClassCastException: com.michaelbaranov.microba.calendar.DatePicker
         at 
com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI.installUI(BasicDatePickerUI.java:63)
         at javax.swing.JComponent.setUI(JComponent.java:652)
         at 
com.michaelbaranov.microba.calendar.CalendarPane.updateUI(CalendarPane.java:138)
         at 
com.michaelbaranov.microba.calendar.CalendarPane.<init>(CalendarPane.java:198)
         at 
com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:74)
         at 
com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:43)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at 
org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:136)
...



Witold Szczerba wrote:
> Hello there,
> I was writing about this few days ago, but now I know the problem is
> my particular form I've made using NetBeans. Here is my problem
> description:
> 
> "Problem with my own components in Palette (Warning: Form Loaded With 
> Errors)"
> http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=78962
> 
> Now I know that this is happening only with one of my form (tried on
> NB5.5 final on WinXP and Linux). I though it might be interesting
> evidence, so I am attaching the exception and my form.
> 
> Here is how to get the IOException:
> 1) download this project:
> http://josh.neostrada.pl/MatisseException.zip
> 2) Open and close WizytyForm (just to make Matisse show it).
> 3) Open SimpleCrudComponent and add for.ex. jTextField to it, then
> save and compile.
> 4) Now when you open WizytyForm again, you will get error and
> exception. Do not change anything, just close whole NetBeans and open
> it again.
> 5) Now - WizytyForm has no problems, embedded SimpleCrudComponent
> looks fine, no trouble at all... until you change SimpleCrudComponent
> again :/
> 
> I tried this on my home PC, at Work (winXP) and at the end I could
> reproduce this on Linux (XFCE @ X.org 6.8).
> 
> I know I could probably create my WizytyForm again from scratch, but
> it would not solve the cause.
> 
> 
> ------------------------------------------------------------------------
> 
> Annotation: Error in loading layout:
> [JPanel]->jPanel2->[layout]
> Initialization of layout support failed.
> Layout information for this container cannot be loaded.
> java.io.IOException: Undefined component referenced in layout: null
> 	at org.netbeans.modules.form.layoutdesign.LayoutPersistenceManager.correctMissingName(LayoutPersistenceManager.java:589)
> 	at org.netbeans.modules.form.layoutdesign.LayoutPersistenceManager.loadModel(LayoutPersistenceManager.java:322)
> 	at org.netbeans.modules.form.layoutdesign.LayoutModel.loadModel(LayoutModel.java:1022)
> 	at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:763)
> 	at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:605)
> 	at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:733)
> 	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:426)
> 	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:206)
> 	at org.netbeans.modules.form.FormEditor$2.run(FormEditor.java:222)
> 	at org.netbeans.modules.form.FormLAF$1.run(FormLAF.java:64)
> 	at org.openide.util.Mutex.doEventAccess(Mutex.java:1178)
> 	at org.openide.util.Mutex.readAccess(Mutex.java:259)
> 	at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:49)
> 	at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:220)
> 	at org.netbeans.modules.form.FormEditor.loadFormDesigner(FormEditor.java:143)
> 	at org.netbeans.modules.form.FormDesigner.componentShowing(FormDesigner.java:1491)
> 	at org.netbeans.core.multiview.MultiViewPeer.peerComponentShowing(MultiViewPeer.java:177)
> 	at org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentShowing(MultiViewCloneableTopComponent.java:113)
> 	at org.openide.windows.WindowManager.componentShowing(WindowManager.java:313)
> 	at org.netbeans.core.windows.WindowManagerImpl.componentShowing(WindowManagerImpl.java:950)
> 	at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:150)
> 	at org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:244)
> 	at org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:220)
> 	at org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:158)
> 	at org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:97)
> 	at org.netbeans.core.windows.Central.addModeOpenedTopComponent(Central.java:584)
> 	at org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:255)
> 	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:998)
> 	at org.openide.windows.TopComponent.open(TopComponent.java:338)
> 	at org.openide.windows.TopComponent.open(TopComponent.java:330)
> 	at org.openide.windows.CloneableOpenSupport.openCloneableTopComponent(CloneableOpenSupport.java:177)
> 	at org.netbeans.modules.form.FormEditorSupport.openFormEditor(FormEditorSupport.java:113)
> 	at org.netbeans.modules.form.FormDataNode$1.actionPerformed(FormDataNode.java:53)
> 	at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1389)
> 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
> 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
> 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
> 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
> 	at java.awt.Component.processMouseEvent(Component.java:5491)
> 	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
> 	at java.awt.Component.processEvent(Component.java:5253)
> 	at java.awt.Container.processEvent(Container.java:1966)
> 	at java.awt.Component.dispatchEventImpl(Component.java:3955)
> 	at java.awt.Container.dispatchEventImpl(Container.java:2024)
> 	at java.awt.Component.dispatchEvent(Component.java:3803)
> 	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
> 	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901)
> 	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
> 	at java.awt.Container.dispatchEventImpl(Container.java:2010)
> 	at java.awt.Window.dispatchEventImpl(Window.java:1778)
> 	at java.awt.Component.dispatchEvent(Component.java:3803)
> [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> 	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
> 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.