scala - java.sql.SQLException: Operation not allowed after ResultSet closed when using Slick 1.0.1 -


this going horrible question since little information can given. pretty we're getting java.sql.sqlexception: operation not allowed after resultset closed at, seems like, random times when using slick 1.0.1 mysql.

i looked exception , seems reason why happens because resultset being either closed prematurely or multiple resultsets being made same statement object (see getting java.sql.sqlexception: operation not allowed after resultset closed).

now issue i'm using slick, whole idea of resultset abstracted away. can't show code since have no idea issue happening (the stack trace points different parts of code whenever happens. pretty much, @ random part of code tries access db, fail).

not doing crazy, withsession's , withtransaction's , session.withtransaction's. c3p0 providing connections.

we have been able notice happens in 3 calls. these 3 calls have in common some-what long running (they make 3-5 calls db, within same session. bad?).

has seen sort of error in slick 1.0.1? i'm aware there slick 2.0 out not ready upgrade yet (unless tells me bug fixed in 2.0).

thanks.

edit: more info about:

show variables '%_timeout'; enter image description here

some info on 3 calls:

call 1:

  • 3 5 reads (2 reads optional)
  • 2 writes

call 2:

  • 4 reads (i've noticed, these 4 big reads. spanning several joins)
  • no writes

call 3 (just noticed call's number of failures has decreased lately):

  • 2 reads
  • 2 writes

thanks @steve waldman answer. issue c3po. setting unreturnedconnectiontimeout very, bad (i somehow missed warning in documentation: http://www.mchange.com/projects/c3p0/#unreturnedconnectiontimeout). getting rid of configuration fixed issue.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -