缓冲区溢出异常simba JDBC

时间:2018-04-06 07:30:03

标签: java jdbc

我试图插入包含27列的1432466条记录

count=0;
BATCH_SIZE=5000;
while (res.next()) {
preparedStatement.setString(1, res.getString(1));
............
preparedStatement.setString(27, res.getString(27));
preparedStatement.addBatch();
if(count % BATCH_SIZE == BATCH_SIZE-1) {
     preparedStatement.executeBatch();
     preparedStatement.clearBatch();
}
count++;
}
preparedStatement.executeBatch();

我面临以下异常。

java.sql.SQLException: [JDBC4ClientDSII]java.nio.BufferOverflowException at com.simba.client.dataengine.SCQueryExecutor.execute(Unknown Source) at com.simba.jdbc.common.SPreparedStatement.executePreparedAnyBatch(Unknown Source) at com.simba.jdbc.common.SPreparedStatement.executeBatch(Unknown Source) at HiveTSConnector.main(HiveTSConnector.java:105) Caused by: java.lang.RuntimeException: java.nio.BufferOverflowException ... 4 more

0 个答案:

没有答案