Thread: [Microba-controls] Fatal issue with DatePicker and NetBeans' Matisse GUI builder.
Brought to you by:
michaelbaranov
From: Witold S. <plj...@gm...> - 2006-11-14 16:37:05
|
Hello there, I am developing application using NetBeans 5.5 and its GUI builder. I had a problem with Matisse throwing exception one one of my forms and that exception was caused by some problem with Microba DatePicker. I do not know much about Swing's internals, but let me show you the answer from Sun employee regarding my problem: 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). ---------------------------------------------------------------------------- Subject: Re: Matisse is throwing exception until I restart NetBeans Tomas Pavek wrote: ---------------------------------------------------------------------------- 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. ---------------------------------------------------------------------------- here is entire context: http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 ---------------------------------------------------------------------------- I really do find Microba's DatePicker better than other date-related widgets (for example the way it deals with null values). Could you guys, take a look at that problem and tell me if you are able to fix that issue? NetBeans is now very popular, its GUI builder is going to be even more powerful, so resolving that could help others as well. Cheers, W.Szczerba |
From: Michael B. <mic...@gm...> - 2006-11-14 16:56:55
|
Witold, It's a known bug I can't get my hands on yet. My hands, means I'm alone coding/maintaining the library... But I want to fix it! Please, provide the FULL stack trace of the exception(s) thrown with descriptions of how you made it fail. It is application runtime, or while developing in IDE etc. I have browsed the thread but there is a partial trace there... I can tell you nothing right now. Regards, Michael. > Hello there, > I am developing application using NetBeans 5.5 and its GUI builder. > I had a problem with Matisse throwing exception one one of my forms > and that exception was caused by some problem with Microba DatePicker. > I do not know much about Swing's internals, but let me show you the > answer from Sun employee regarding my problem: > > 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). > > ---------------------------------------------------------------------------- > Subject: Re: Matisse is throwing exception until I restart NetBeans > Tomas Pavek wrote: > ---------------------------------------------------------------------------- > 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. > ---------------------------------------------------------------------------- > here is entire context: > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > ---------------------------------------------------------------------------- > > I really do find Microba's DatePicker better than other date-related > widgets (for example the way it deals with null values). Could you > guys, take a look at that problem and tell me if you are able to fix > that issue? > NetBeans is now very popular, its GUI builder is going to be even more > powerful, so resolving that could help others as well. > > Cheers, > W.Szczerba > > ------------------------------------------------------------------------- > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > Check out Slashdot's new job board. Browse through tons of technical jobs > posted by companies looking to hire people just like you. > http://jobs.slashdot.org/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > |
From: Michael B. <mic...@gm...> - 2006-11-14 17:06:40
|
Witold, one more thing: please update the CalendarPane#updateUi() with this and tell me if if fixes the trouble: public void updateUI() { ComponentUI delegate = UIManager.getUI(this); if (delegate == null) { Microba.init(); delegate = UIManager.getUI(this); } setUI(delegate); invalidate(); } Michael. > Hello there, > I am developing application using NetBeans 5.5 and its GUI builder. > I had a problem with Matisse throwing exception one one of my forms > and that exception was caused by some problem with Microba DatePicker. > I do not know much about Swing's internals, but let me show you the > answer from Sun employee regarding my problem: > > 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). > > ---------------------------------------------------------------------------- > Subject: Re: Matisse is throwing exception until I restart NetBeans > Tomas Pavek wrote: > ---------------------------------------------------------------------------- > 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. > ---------------------------------------------------------------------------- > here is entire context: > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > ---------------------------------------------------------------------------- > > I really do find Microba's DatePicker better than other date-related > widgets (for example the way it deals with null values). Could you > guys, take a look at that problem and tell me if you are able to fix > that issue? > NetBeans is now very popular, its GUI builder is going to be even more > powerful, so resolving that could help others as well. > > Cheers, > W.Szczerba > > ------------------------------------------------------------------------- > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > Check out Slashdot's new job board. Browse through tons of technical jobs > posted by companies looking to hire people just like you. > http://jobs.slashdot.org/ > _______________________________________________ > Microba-controls mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microba-controls > > |
From: Witold S. <plj...@gm...> - 2006-11-14 19:48:27
Attachments:
DatePickerCCE.txt
|
Hi there, I looked closer at the exceptions and I attached only one, that was thrown by NetBeans after the exception that was thrown by DatePicker... The real cause is ClassCastException in class: com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI method: installUI(JComponent c) peer = (DatePicker) c; <-- ClassCastException I patched CalendarPane#updateUI() as you said, but that didn't help :( There is stack trace in the attachment (I hope that is full stack trace, don't have idea how to get anything more verbose). For your convenience I used version 0.4.3.3 before applying your patch, so the line numbers will be valid. Answering your earlier question: NetBeans is throwing that exception in while developing, there is no problem at runtime. If you would like to reproduce my problem you would have to download NB 5.5 and follow my steps described in my first email of that thread: http://www.netbeans.org/servlets/ReadMsg?list=nbui&msgNo=8666 I know that the steps above could take lot of your time, so if I can help somehow :), just write. 2006/11/14, Michael Baranov <mic...@gm...>: > Witold, > > one more thing: > please update the CalendarPane#updateUi() with this and tell me if if > fixes the trouble: > > public void updateUI() { > ComponentUI delegate = UIManager.getUI(this); > if (delegate == null) { > Microba.init(); > delegate = UIManager.getUI(this); > } > setUI(delegate); > invalidate(); > } > > > Michael. > > Hello there, > > I am developing application using NetBeans 5.5 and its GUI builder. > > I had a problem with Matisse throwing exception one one of my forms > > and that exception was caused by some problem with Microba DatePicker. > > I do not know much about Swing's internals, but let me show you the > > answer from Sun employee regarding my problem: > > > > 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). > > > > ---------------------------------------------------------------------------- > > Subject: Re: Matisse is throwing exception until I restart NetBeans > > Tomas Pavek wrote: > > ---------------------------------------------------------------------------- > > 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. > > ---------------------------------------------------------------------------- > > here is entire context: > > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > > ---------------------------------------------------------------------------- > > > > I really do find Microba's DatePicker better than other date-related > > widgets (for example the way it deals with null values). Could you > > guys, take a look at that problem and tell me if you are able to fix > > that issue? > > NetBeans is now very popular, its GUI builder is going to be even more > > powerful, so resolving that could help others as well. > > > > Cheers, > > W.Szczerba > > > > ------------------------------------------------------------------------- > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > |
From: Witold S. <plj...@gm...> - 2006-11-14 20:54:13
Attachments:
DatePickerCCE_2.txt
|
Hello again, There are exceptions in attachment. Actually I do not understand it: if I get it right, Java is throwing ClassCastException, but the component is actually the class it should be! Do you know why this is happening only when NetBeans is changing class loaders? (that was what Tomas Pavek said). Maybe that is the answer: the class has the same name, but belongs to other class loader, so ClassCastException... well - that is something beyond my knowledge of Java :/ 2006/11/14, Michael Baranov <mic...@gm...>: > > Witold, > > Thanks. I've a few ideas and I need proofs of them. > > 1) Please apply this to > BasicDatePickerUI#installUI(JComponent c): > > public void installUI(JComponent c) { > try { > peer = (DatePicker) c; > } catch (ClassCastException e) { > throw new ClassCastException("Actual class was: " + > c.getClass().getName()); > } > installComponents(); > istallListeners(); > installKeyboardActions(); > } > > Run it and give me the stacktrace. > > 2) Again change BasicDatePickerUI#installUI(JComponent c): > > public void installUI(JComponent c) { > try { > peer = (DatePicker) c; > } catch (ClassCastException e) { > return; > } > installComponents(); > istallListeners(); > installKeyboardActions(); > } > > And see if the problem disappears. > > Thanks! > > Hi there, > I looked closer at the exceptions and I attached only one, that was > thrown by NetBeans after the exception that was thrown by > DatePicker... > The real cause is ClassCastException in class: > com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI > method: > installUI(JComponent c) > peer = (DatePicker) c; <-- ClassCastException > > I patched CalendarPane#updateUI() as you said, but that didn't help :( > There is stack trace in the attachment (I hope that is full stack > trace, don't have idea how to get anything more verbose). For your > convenience I used version 0.4.3.3 before applying your patch, so the > line numbers will be valid. > > Answering your earlier question: NetBeans is throwing that exception > in while developing, there is no problem at runtime. If you would like > to reproduce my problem you would have to download NB 5.5 and follow > my steps described in my first email of that thread: > http://www.netbeans.org/servlets/ReadMsg?list=nbui&msgNo=8666 > > I know that the steps above could take lot of your time, so if I can > help somehow :), just write. > > > > 2006/11/14, Michael Baranov <mic...@gm...>: > > Witold, > > one more thing: > please update the CalendarPane#updateUi() with this and tell me if if > fixes the trouble: > > public void updateUI() { > ComponentUI delegate = UIManager.getUI(this); > if (delegate == null) { > Microba.init(); > delegate = UIManager.getUI(this); > } > setUI(delegate); > invalidate(); > } > > > Michael. > > Hello there, > > I am developing application using NetBeans 5.5 and its GUI builder. > > I had a problem with Matisse throwing exception one one of my forms > > and that exception was caused by some problem with Microba DatePicker. > > I do not know much about Swing's internals, but let me show you the > > answer from Sun employee regarding my problem: > > > > 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). > > > > > ---------------------------------------------------------------------------- > > Subject: Re: Matisse is throwing exception until I restart NetBeans > > Tomas Pavek wrote: > > > ---------------------------------------------------------------------------- > > 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. > > > ---------------------------------------------------------------------------- > > here is entire context: > > > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > > > ---------------------------------------------------------------------------- > > > > I really do find Microba's DatePicker better than other date-related > > widgets (for example the way it deals with null values). Could you > > guys, take a look at that problem and tell me if you are able to fix > > that issue? > > NetBeans is now very popular, its GUI builder is going to be even more > > powerful, so resolving that could help others as well. > > > > Cheers, > > W.Szczerba > > > > > ------------------------------------------------------------------------- > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it > Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > > ________________________________ > > microba-0.4.3.3-full > --------------------- > > Cannot create instance of > com.michaelbaranov.microba.calendar.DatePicker. > The component cannot be loaded. > 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:146) > at > com.michaelbaranov.microba.calendar.CalendarPane.<init>(CalendarPane.java:214) > at > com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:109) > at > com.michaelbaranov.microba.calendar.DatePicker.<init>(DatePicker.java:67) > 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) > at > org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:199) > at > org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:143) > at > org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:583) > at > org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:733) > 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.activateModeTopComponent(Central.java:1387) > at > org.netbeans.core.windows.WindowManagerImpl.topComponentRequestActive(WindowManagerImpl.java:1020) > at > org.openide.windows.TopComponent.requestActive(TopComponent.java:625) > at > org.netbeans.modules.form.FormEditorSupport.openFormEditor(FormEditorSupport.java:114) > 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) > > |