Java 5 bug?

2004 Oct 9 at 03:49 » Tagged as :

Just upgraded the j2se 5.0 installation on my computer from the beta to the full release. It seems the beta may have been more stable than the gold.

Why do I say that? well after upgrading to jdl 1.5.0 (without the beta) the plug in always throws a hiccup with Rad Upload. The very same applet that works on java version 1.4.1 to 1.5.0 beta throws quite a few nasty exceptions with the full release. I will append the stack trace to the end of this blog entry, you can check it out for yourself, you do not find any references to our code in the trace.

So when exactly does the error occur? it happens just when the upload reaches completion and the contents of the drop area is about to be updated with the response returned by the server. I tried this with several versions of Rad Upload as well as several versions of java so I am pretty convinced that it's not our fault. Interestingly our offline tester (which is basically rad upload modified to run in a JFrame) works pretty well even with the latest version of java.

Here is that stacktrace.:

Exception in thread "AWT-EventQueue-13" java.lang.NullPointerException

at javax.swing.text.html.CSS$FontSize.getValue(CSS.java672)

at javax.swing.text.html.CSS$FontSize.toStyleConstants(CSS.java805)

at javax.swing.text.html.StyleSheet$ViewAttributeSet.getAttribute(StyleSheet.java:2630)

at javax.swing.text.StyleConstants.getFontSize(StyleConstants.java:358)

at javax.swing.text.html.CSS$FontSize.getValue(CSS.java678)

at javax.swing.text.html.CSS$FontSize.toStyleConstants(CSS.java805)

at javax.swing.text.html.StyleSheet$ViewAttributeSet.getAttribute(StyleSheet.java:2630)

at javax.swing.text.StyleConstants.getFontSize(StyleConstants.java:358)

at javax.swing.text.html.CSS$FontSize.getValue(CSS.java678)

at javax.swing.text.html.CSS$FontSize.toStyleConstants(CSS.java805)

at javax.swing.text.html.StyleSheet$ViewAttributeSet.getAttribute(StyleSheet.java:2630)

at javax.swing.text.StyleConstants.getFontSize(StyleConstants.java:358)

at javax.swing.text.html.CSS$FontSize.getValue(CSS.java678)

at javax.swing.text.html.CSS.getFontSize(CSS.java:614)

at javax.swing.text.html.CSS.getFont(CSS.java:574)

at javax.swing.text.html.StyleSheet.getFont(StyleSheet.java:867)

at javax.swing.text.DefaultStyledDocument.getFont(DefaultStyledDocument.java:777)

at javax.swing.text.LabelView.setPropertiesFromAttributes(LabelView.java28)

at javax.swing.text.html.InlineView.setPropertiesFromAttributes(InlineView.java:229)

at javax.swing.text.LabelView.sync(LabelView.java:39)

at javax.swing.text.LabelView.getFont(LabelView.java89)

at javax.swing.text.GlyphPainter1.sync(GlyphPainter1.java94)

at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:42)

at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:536)

at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:692)

at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:216)

at javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java28)

at javax.swing.text.BoxView.checkRequests(BoxView.java:911)

at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)

at javax.swing.text.html.ParagraphView.getMinimumSpan(ParagraphView.java:257)

at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)

at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java29)

at javax.swing.text.BoxView.checkRequests(BoxView.java:911)

at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)

at javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:362)

at javax.swing.text.html.TableView.checkSingleColumnCell(TableView.java:434)

at javax.swing.text.html.TableView.calculateColumnRequirements(TableView.java:397)

at javax.swing.text.html.TableView.calculateMinorAxisRequirements(TableView.java:519)

at javax.swing.text.BoxView.checkRequests(BoxView.java:911)

at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)

at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)

at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java29)

at javax.swing.text.BoxView.checkRequests(BoxView.java:911)

at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)

at javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:362)

at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)

at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java29)

at javax.swing.text.BoxView.checkRequests(BoxView.java:911)

at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:325)

at javax.swing.text.BoxView.layout(BoxView.java:682)

at javax.swing.text.BoxView.setSize(BoxView.java:379)

at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java631)

at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:825)

at javax.swing.JComponent.getPreferredSize(JComponent.java582)

at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java227)

at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)

at java.awt.Container.layout(Container.java401)

at java.awt.Container.doLayout(Container.java390)

at java.awt.Container.validateTree(Container.java473)

at java.awt.Container.validate(Container.java448)

at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java13)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java63)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java57)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java49)

at java.awt.EventDispatchThread.run(EventDispatchThread.java10)