You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL specific issue - java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets a re open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
#301
Closed
rbygrave opened this issue
May 29, 2015
· 3 comments
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
at com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:3361)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2323)
at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeQuery(ExtendedPreparedStatement.java:132)
at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQueryWithOption(CQuery.java:325)
at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQuery(CQuery.java:274)
at com.avaje.ebeaninternal.server.query.CQueryEngine.findMany(CQueryEngine.java:165)
at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:80)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:284)
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1372)
at com.avaje.ebeaninternal.server.core.DefaultBeanLoader.loadBean(DefaultBeanLoader.java:335)
at com.avaje.ebeaninternal.server.core.DefaultServer.loadBean(DefaultServer.java:468)
at com.avaje.ebeaninternal.server.loadcontext.DLoadBeanContext.loadSecondaryQuery(DLoadBeanContext.java:94)
at com.avaje.ebeaninternal.server.loadcontext.DLoadContext.executeSecondaryQueries(DLoadContext.java:109)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.executeSecondaryQueries(OrmQueryRequest.java:82)
at com.avaje.ebeaninternal.server.query.CQueryIteratorWithBuffer.hasNext(CQueryIteratorWithBuffer.java:46)
...
The text was updated successfully, but these errors were encountered:
rbygrave
changed the title
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets a re open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
MySQL specific issue - java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets a re open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
May 29, 2015
So this issue is specific to MySql and findIterate() (and the variations - findEach() findEachWhile() etc.
There is a limitation in the MySql jdbc driver that a single connection can't stream a resultSet ... and perform other queries. No other jdbc drivers are known to have this limitation.
Now for a EbeanORM iteration query (findIterate(), findEach(), findEachWhile() etc) there can be 'query joins' executed in order to build other parts of the object graph in a batch fashion (100 at a time etc). Now these 'query join' sql queries get this error with MySql jdbc drivers.
The 'fix' is to detect that the database platform has this limitation, and to use other transactions for the 'query joins' (but ensuring that the same persistence context is used of course).
… set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets a re open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries
root cause
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@3ef4415f is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
at com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:3361)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2323)
at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeQuery(ExtendedPreparedStatement.java:132)
at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQueryWithOption(CQuery.java:325)
at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQuery(CQuery.java:274)
at com.avaje.ebeaninternal.server.query.CQueryEngine.findMany(CQueryEngine.java:165)
at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:80)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:284)
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1372)
at com.avaje.ebeaninternal.server.core.DefaultBeanLoader.loadBean(DefaultBeanLoader.java:335)
at com.avaje.ebeaninternal.server.core.DefaultServer.loadBean(DefaultServer.java:468)
at com.avaje.ebeaninternal.server.loadcontext.DLoadBeanContext.loadSecondaryQuery(DLoadBeanContext.java:94)
at com.avaje.ebeaninternal.server.loadcontext.DLoadContext.executeSecondaryQueries(DLoadContext.java:109)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.executeSecondaryQueries(OrmQueryRequest.java:82)
at com.avaje.ebeaninternal.server.query.CQueryIteratorWithBuffer.hasNext(CQueryIteratorWithBuffer.java:46)
...
The text was updated successfully, but these errors were encountered: