Olá pessoal
Estou com um probleminha para criar uma fatura de fornecedor automaticamente através do pedido de compra. O erro aparece no console e é o seguinte:
[code]===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent(DefaultTableCellRenderer.java:223)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:118)
at org.compiere.minigrid.MiniTable.autoSize(MiniTable.java:121)
at org.compiere.grid.VCreateFromInvoice.loadTableOIS(VCreateFromInvoice.java:629)
at org.compiere.grid.VCreateFrom.loadOrder(VCreateFrom.java:591)
at org.compiere.grid.VCreateFromInvoice.actionPerformed(VCreateFromInvoice.java:220)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1242)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:569)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:605)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:814)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6126)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)
at java.awt.Component.processEvent(Component.java:5891)
at java.awt.Container.processEvent(Container.java:2102)
at java.awt.Component.dispatchEventImpl(Component.java:4497)
at java.awt.Container.dispatchEventImpl(Container.java:2160)
===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:170)
at org.compiere.minigrid.MiniTable.autoSize(MiniTable.java:121)
at org.compiere.grid.VCreateFromInvoice.loadTableOIS(VCreateFromInvoice.java:629)
at org.compiere.grid.VCreateFrom.loadOrder(VCreateFrom.java:591)
at org.compiere.grid.VCreateFromInvoice.actionPerformed(VCreateFromInvoice.java:220)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1242)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:569)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:605)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:814)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6126)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)
at java.awt.Component.processEvent(Component.java:5891)
at java.awt.Container.processEvent(Container.java:2102)
at java.awt.Component.dispatchEventImpl(Component.java:4497)
at java.awt.Container.dispatchEventImpl(Container.java:2160)
at java.awt.Component.dispatchEvent(Component.java:4327)
===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent(DefaultTableCellRenderer.java:223)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:118)
at javax.swing.JTable.prepareRenderer(JTable.java:5670)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:155)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:170)
at javax.swing.JTable.prepareRenderer(JTable.java:5670)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:155)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent(DefaultTableCellRenderer.java:223)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:118)
at javax.swing.JTable.prepareRenderer(JTable.java:5670)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:155)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent._paintImmediately(JComponent.java:5096)
at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:749)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
===========> VCellRenderer.setValue: (Colortech Digital Printing Ltda.) org.compiere.util.KeyNamePair [11]
java.lang.IllegalArgumentException: Cannot format given Object as a Number
at java.text.DecimalFormat.format(DecimalFormat.java:487)
at java.text.Format.format(Format.java:140)
at org.compiere.grid.ed.VCellRenderer.setValue(VCellRenderer.java:198)
at org.compiere.grid.ed.VCellRenderer.getTableCellRendererComponent(VCellRenderer.java:170)
at javax.swing.JTable.prepareRenderer(JTable.java:5670)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:155)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent._paintImmediately(JComponent.java:5096)
at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:749)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)[/code]
O problema é pq as colunas estão no lugar errado! O nome da organização está na coluna qtde, e claro que isso nunca vai ser um número!
Rodei o client sem as minhas customizações feitas em java e o erro também acontece.
Alguma idéia (ainda tem acento?) aonde está o problema?
Obrigado