Apr 29, 2011 9:24:04 AM library.check_out jButton1ActionPerformed
SEVERE: null
java.sql.SQLException: ResultSet is closed
at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(JdbcOdbcResultSet.java:6646)
at sun.jdbc.odbc.JdbcOdbcResultSet.next(JdbcOdbcResultSet.java:1249)
我有一个名为Database的类。
public class Database {
public Connection connect = null;
public Statement st = null;
public PreparedStatement ps = null;
public ResultSet rs = null;
public boolean connectDB() throws Exception {
try {
Class.forName("com.mysql.jdbc.Driver
我正在尝试执行getPendingSalesOrderID()方法,该方法调用方法selectInAsending(.)。
但这显示了一个SQLException,表示java.sql.SQLException:在ResultSet关闭后不允许操作
在这里,db.endSelect()将关闭所有连接。我认为问题就在于此。。
public ArrayList getPendingSalesOrderIDs() {
ArrayList a = new ArrayList();
try {
//ResultSet r = znAlSalesOrder.select(
我的代码中有这个错误,并对其进行了彻底的检查和编辑,但我仍然得到相同的问题。我还使用了多个resultSet和语句,但仍然出现了相同的错误。下面是我得到的错误:
"Database Connected with Current Date 20130221
java.sql.SQLException: ResultSet is closed
at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.next(Unknown
Caused by: java.sql.SQLException: Result set already closed
at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:110)
at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:65)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown
我对这段代码有一个问题:
ResultSet dane = statement.executeQuery("SELECT * FROM ProWarns WHERE blahblah = '" + cel + "'");
while (dane.next()) {
// some code (only get some string from result)
if (TimeEnd <= EndTime) {
statement.executeUpdate(
"DELETE
我被这个错误卡住了,这里我的42行是while(rs.next()){,请帮我解决这个问题,我被这个卡住了几个小时。
> Exception in thread "main" java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
每当我尝试使用这种方法时,我都会得到它。
java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
我在我的weblogic控制台中得到了这个异常:*
Caused by: java.sql.SQLException: Attempt to access a harvested connection
at weblogic.jdbc.wrapper.Connection.checkHarvest(Connection.java:1676)
at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:108)
at weblogic.jdbc.wrapper.ResultSet.
尝试使用resultSet.getArray("variables")从配置单元JDBC ResultSet中检索数组对象,但作为Java.sql.SQLException: Method Not Supported收到错误 代码: case class Variables(val variable:String, val type:String, val value:String)
case class Updates(val title:String, val variables:Array[Variables])
val resultSet = stmt.execut