#978 After running a select query, error when updating manually

snapshot
closed-fixed
Core (461)
5
2011-08-21
2011-04-27
Toto
No

java 1.6_021
squirrel: squirrel-sql-Snapshot-20110417_1746-install.jar
database: DB2
driver : com.ibm.db2.jcc.DB2Driver

Note : manually update works well when going through 'Objects' panel.

Bug: after running a select query, making the result editable, I manually tried to update a cell, the cell changed color to yellow, I changed the value but when pressed Enter key I had this error :

Logged by net.sourceforge.squirrel_sql.client.Main at 4/27/11 2:32 PM:

Exception occured dispatching Event java.awt.event.KeyEvent[KEY_PRESSED,keyCode=10,keyText=Entrée,keyChar=Entrée,keyLocation=KEY_LOCATION_STANDARD,rawCode=13,primaryLevelUnicode=13,scancode=28] on net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.RestorableJTextField[,140,0,48x15,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.EmptyBorder@bf9a12,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=0,columnWidth=0,command=,horizontalAlignment=LEADING]

Stacktrace:
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Short
at net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeShort.setPreparedStatementValue(DataTypeShort.java:405)
at net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.whereClause.ParameterWhereClausePart.setParameter(ParameterWhereClausePart.java:95)
at net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.whereClause.WhereClausePartUtil.setParameters(WhereClausePartUtil.java:45)
at net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl.count(DataSetUpdateableTableModelImpl.java:283)
at net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl.getWarningOnCurrentData(DataSetUpdateableTableModelImpl.java:236)
at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.getWarningOnCurrentData(SQLExecuterTask.java:775)
at net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerEditableTablePanel.changeUnderlyingValueAt(DataSetViewerEditableTablePanel.java:209)
at net.sourceforge.squirrel_sql.fw.datasetviewer.MyTableModel.setValueAt(MyTableModel.java:166)
at net.sourceforge.squirrel_sql.fw.gui.SortableTableModel.setValueAt(SortableTableModel.java:140)
at javax.swing.JTable.setValueAt(Unknown Source)
at net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel$MyJTable.setValueAt(DataSetViewerTablePanel.java:400)
at javax.swing.JTable.editingStopped(Unknown Source)
at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(Unknown Source)
at javax.swing.DefaultCellEditor.stopCellEditing(Unknown Source)
at javax.swing.DefaultCellEditor$EditorDelegate.actionPerformed(Unknown Source)
at javax.swing.JTextField.fireActionPerformed(Unknown Source)
at javax.swing.JTextField.postActionEvent(Unknown Source)
at javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.sourceforge.squirrel_sql.client.Main$1.dispatchEvent(Main.java:93)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

    • assigned_to: colbell --> wis775
     
  • Fixed in Subversion. The change will be available in the next snapshot and/or stable release.

     
    • status: open --> open-fixed
     
    • status: open-fixed --> closed-fixed