OperationNotSupportedException:流结果(ResultSet)不支持该操作

时间:2018-10-30 10:45:44

标签: java mysql jdbc

在下面提供此代码:

pathPrefix

if (resultSet == null) { pageNumber = 0; resultSet = getResultSet(db); } if (resultSet != null) { resultSetMetaData = resultSet.getMetaData(); columnCount = resultSetMetaData.getColumnCount(); resultSetArray = getResultSetAsList(resultSet, columnCount); rowCount = resultSetArray.size(); } countTempSize = 0; if (rowCount > 0 && resultSetArray != null && resultSetArray.size() > 0) { pageNumber = pageNumber + rowCount; ResultSet tempResultSet = getResultSet(db); if (resultSet != null && tempResultSet != null) { if (tempResultSetArray != null && tempResultSetArray.size() > 0) { tempResultSetArray.clear(); } tempResultSetArray = getResultSetAsList(tempResultSet, columnCount); for (String columnName: timestampColumnName) { resultSet.last(); tempResultSet.beforeFirst(); int i = 0; while (tempResultSet.next() && resultSet.getString(columnName).toString().equals(tempResultSet.getString(columnName).toString())) { resultSetArray.add(tempResultSetArray.get(i)); i++; countTempSize++; } } } } 处发生以下错误:

  

ERROR无法运行表查询   TimestampIncrementingTableQuerier {table =“ mpdb”。“ meta_eligibility”,   query ='null',topicPrefix ='Audit-mpdb-',incrementingColumn ='',   timestampColumns = [created_on]}:{}   (io.confluent.connect.jdbc.source.JdbcSourceTask)   com.mysql.jdbc.OperationNotSupportedException:不支持操作   用于流式传输结果集   com.mysql.jdbc.RowDataCursor.notSupported(RowDataCursor.java:452)在   com.mysql.jdbc.RowDataCursor.beforeFirst(RowDataCursor.java:260)在   com.mysql.jdbc.ResultSetImpl.first(ResultSetImpl.java:1129)位于   io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:130)     在   io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:63)     在   io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:300)     在   org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:179)     在   org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:170)     在   org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214)     在   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)     在java.util.concurrent.FutureTask.run(FutureTask.java:266)在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     在   java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)     在java.lang.Thread.run(Thread.java:745)

这不起作用。我怎么写?

0 个答案:

没有答案