When I edit CLOB type in oracle db I can enter the text that has one line. However, when I try to enter more than one line I get following exception:
191237 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl - updateTableComponent: unexpected exception - ORA-01861: literal does not match format string
while executing SQL: UPDATE "CC"."T" SET MSG = ? WHERE SEQ_NUM=1 AND CREATE_TIMESTAMP='2008-11-04 17:32:42.0' AND STATUS_FLAG='N' AND MSG_TYPE='C' AND MSG_ID IS NULL AND STATUS_CODE IS NULL AND STATUS_DESC IS NULL AND ATTEMPT_COUNT IS NULL AND MODIFIED_BY='sdf' AND MODIFIED_TIMESTAMP='2008-11-04 17:32:42.0' AND ROWID='AAAKohAAEAABTIXAAA'
262080 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl - Exception seen during check on DB. Exception was:
ORA-01861: literal does not match format string
Update is probably not safe to do.
Do you wish to proceed?
java.sql.SQLException: ORA-01861: literal does not match format string
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:206)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:945)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1053)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:829)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1263)
at net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl.getWarningOnCurrentData(DataSetUpdateableTableModelImpl.java:218)
at net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.table.ContentsTab.getWarningOnCurrentData(ContentsTab.java:569)
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:137)
at javax.swing.JTable.setValueAt(JTable.java:1926)
at net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel$MyJTable.setValueAt(DataSetViewerTablePanel.java:354)
at net.sourceforge.squirrel_sql.fw.datasetviewer.CellDataPopup$ColumnDataPopupPanel$1.actionPerformed(CellDataPopup.java:264)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:180)
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)
Actually editing any other column causes the same problem.
I have found the cause:
* I have set globalpref->datatypecontrol->timestamp->usestringversionoftimestamp
When I reset it to default (useJdbcStandardEscapeFormat) it works correct again.
No more issues like this.