我在 groovy 中有以下代码,并且我需要控制循环行,以便我可以将卡盘中的行拆分并传递给其他线程(通过参与者)。但看起来 next() 不能被调用,我没有进行以下测试
def ORACLE = Sql.newInstance( "jdbc:oracle:thin:@.....", "xxx", "xxx", "oracle.jdbc.driver.OracleDriver" )
java.sql.ResultSet rs = ORACLE.executeQuery("select 1 as x from dual")
rs.next()
错误:
Oct 30, 2012 6:15:44 AM org.codehaus.groovy.runtime.StackTraceUtils sanitize
WARNING: Sanitizing stacktrace:
java.sql.SQLException: Closed Statement: next
oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:242)