Tuesday, January 19, 2010

"AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0

While trying to run Application Module in Jdeveloper 10.1.3.3, I got the following error.
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3199)
at oracle.sql.NUMBER.toString(NUMBER.java:761)
at oracle.sql.NUMBER.stringValue(NUMBER.java:2090)
at oracle.jbo.domain.Number.toString(Number.java:390)
at javax.swing.table.DefaultTableCellRenderer.setValue(DefaultTableCellRenderer.java:298)
at javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponentDefaultTableCellRenderer.java:190)
at javax.swing.JTable.prepareRenderer(JTable.java:3924)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2070)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1972)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1895)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
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)
BC4J Tester exit code(0)

As a basic human nature, I searched on the internet to find out that it was a bug as reported here.
http://forums.oracle.com/forums/thread.jspa?messageID=1617924?

But the same was fixed in Jdeveloper 10.1.3.3. Then why did it bug me now. It was then I realized that I had synchronized my Entity Object with the database. I opened one of my entity object and was wondering to see the Type of one of the attributes as String although it was a Number, something similar to this.




So I just modified all the Attribute types according to the ones in the database and hurrah it was working fine.

1 comment: