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.
Build: NetBeans IDE Dev (Build 200810041417) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86 Stacktrace: java.lang.NullPointerException at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(WindowsTableHeaderUI.java:108) at org.netbeans.modules.db.dataview.output.DataViewTableSorter$SortableHeaderRenderer.getTableCellRendererComponent(DataViewTableSorter.java:494) at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:663) at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableHeaderUI.java:698) at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTableHeaderUI.java:727) at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:758)
Created attachment 71604 [details] stacktrace
I had a similar issue in History. If it can be avoided, don't set the TableCellRendererComponent. This might need to be fixed in 6.5 and priority raised to 1
*** Issue 149860 has been marked as a duplicate of this issue. ***
*** Issue 149858 has been marked as a duplicate of this issue. ***
*** Issue 149857 has been marked as a duplicate of this issue. ***
Roman, can you reproduce on Windows Vista ? VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86
I tried on Windows Vista with latest build, but without success. I wasn't able to reproduce this issue. Probably it will be better to have steps to reproduce, since I just tried "View Data" and then sort columns and tried the same for "SQL History" and don't have any problem, but probably I just didn't do necessary action.
I am unable to reproduce this both in Windows and Mac.
This does look like a P2 to me, I have never observed this exception. I need to set the TableCellRendererComponent for sorting.
http://hg.netbeans.org/main/rev/fd9deccbd97d
The fix for this issue doesn't look right. Either it is working around an issue in the JDK, in which case a JDK bug needs to be filed, or it is working around a problem in dataview. Either way, it is a workaround. Catching NullPointerException (or disguising it by catching Exception) is a discouraged practice. What is the exact case of the NPE?
I agree. I am not sure whether it is a JDK issue or not. I could never reproduce this and did not like this kind of workaround either.
I don't know how to fix this. All can do is revert this change, unless someone has a better suggestion.
I can never reproduce this both in Windows and Mac. So marking it as Works for me.