I got the following errors when I insert a large text into a CLOB in
oracle by using iBatis. How do I resulve it? I am using Oracle 10G jdbc
deiver.
org.springframework.jdbc.UncategorizedSQLException:
(SqlMapClientTemplate): encountered SQLException [
--- The error occurred in
edu/umich/med/umms/tgsubmission/dao/ibatis_map/tgs_info_trainee.xml.
--- The error occurred while applying a parameter map.
--- Check the Tgs_info_trainee.insert_Tgs_info_trainee_map.
--- Check the parameter mapping for the 'INFO_TEXT' property.
--- Cause: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters]; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
edu/umich/med/umms/tgsubmission/dao/ibatis_map/tgs_info_trainee.xml.
--- The error occurred while applying a parameter map.
--- Check the Tgs_info_trainee.insert_Tgs_info_trainee_map.
--- Check the parameter mapping for the 'INFO_TEXT' property.
--- Cause: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters
org.springframework.jdbc.UncategorizedSQLException:
(SqlMapClientTemplate): encountered SQLException [
--- The error occurred in
edu/umich/med/umms/tgsubmission/dao/ibatis_map/tgs_info_trainee.xml.
--- The error occurred while applying a parameter map.
--- Check the Tgs_info_trainee.insert_Tgs_info_trainee_map.
--- Check the parameter mapping for the 'INFO_TEXT' property.
--- Cause: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters]; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
edu/umich/med/umms/tgsubmission/dao/ibatis_map/tgs_info_trainee.xml.
--- The error occurred while applying a parameter map.
--- Check the Tgs_info_trainee.insert_Tgs_info_trainee_map.
--- Check the parameter mapping for the 'INFO_TEXT' property.
--- Cause: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
edu/umich/med/umms/tgsubmission/dao/ibatis_map/tgs_info_trainee.xml.
--- The error occurred while applying a parameter map.
--- Check the Tgs_info_trainee.insert_Tgs_info_trainee_map.
--- Check the parameter mapping for the 'INFO_TEXT' property.
--- Cause: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters
Caused by: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:87)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:500)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:89)
at
org.springframework.orm.ibatis.SqlMapClientTemplate$11.doInSqlMapClient(SqlMapClientTemplate.java:282)
at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:140)
at
org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:280)
at
edu.umich.med.umms.tgsubmission.dao.sql.Tgs_info_traineeDaoSql.insertTgs_info_trainee(Tgs_info_traineeDaoSql.java:67)
at
unit.edu.umich.med.umms.tgsubmission.dao.Tgs_info_traineeDaoSqlTestCase.doTestInsert(Tgs_info_traineeDaoSqlTestCase.java:100)
at
unit.edu.umich.med.umms.tgsubmission.dao.Tgs_info_traineeDaoSqlTestCase.testAll(Tgs_info_traineeDaoSqlTestCase.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
Caused by: java.sql.SQLException: setString can only process strings of
less than 32766 chararacters
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at
oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4588)
at
oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4559)
at
com.ibatis.sqlmap.engine.type.ParameterSetterImpl.setString(ParameterSetterImpl.java:139)
at
com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback.setParameter(ClobTypeHandlerCallback.java:45)
at
com.ibatis.sqlmap.engine.type.CustomTypeHandler.setParameter(CustomTypeHandler.java:46)
at
com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165)
at
com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:196)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:74)
... 23 more
Caused by:
java.sql.SQLException: setString can only process strings of less than
32766 chararacters
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at
oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4588)
at
oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4559)
at
com.ibatis.sqlmap.engine.type.ParameterSetterImpl.setString(ParameterSetterImpl.java:139)
at
com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback.setParameter(ClobTypeHandlerCallback.java:45)
at
com.ibatis.sqlmap.engine.type.CustomTypeHandler.setParameter(CustomTypeHandler.java:46)
at
com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165)
at
com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:196)
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:74)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:500)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:89)
at
org.springframework.orm.ibatis.SqlMapClientTemplate$11.doInSqlMapClient(SqlMapClientTemplate.java:282)
at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:140)
at
org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:280)
at
edu.umich.med.umms.tgsubmission.dao.sql.Tgs_info_traineeDaoSql.insertTgs_info_trainee(Tgs_info_traineeDaoSql.java:67)
at
unit.edu.umich.med.umms.tgsubmission.dao.Tgs_info_traineeDaoSqlTestCase.doTestInsert(Tgs_info_traineeDaoSqlTestCase.java:100)
at
unit.edu.umich.med.umms.tgsubmission.dao.Tgs_info_traineeDaoSqlTestCase.testAll(Tgs_info_traineeDaoSqlTestCase.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
-Henry