Random "connection closed" issue

42 views
Skip to first unread message

Sanjay Kumar

unread,
Nov 1, 2013, 8:27:32 PM11/1/13
to sqld...@googlegroups.com
I am getting random errors like below trying to use SQLDroid in my app.
It seems SQLDroid keeps track of open connections and closes the underlying database when no connections are left open.
But it seems to close live connections sometimes - I am not sure how (I have a few asynctasks accessing the database apart from the UI thread).
Have you encountered this problem and should I modify the driver to eliminate its pooling behavior (as an option) and see what happens ?

thanks,

-Sanjay

ps: is this group still active ?

11-01 19:52:13.523: E/MetarMap(26622): java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /storage/sdcard0/Android/data/com.metarmap.tab/files/databases/prefs.sqlite
11-01 19:52:13.523: E/MetarMap(26622):     at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
11-01 19:52:13.523: E/MetarMap(26622):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1310)
11-01 19:52:13.523: E/MetarMap(26622):     at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1253)
11-01 19:52:13.523: E/MetarMap(26622):     at org.sqldroid.SQLiteDatabase.rawQuery(SQLiteDatabase.java:116)
11-01 19:52:13.523: E/MetarMap(26622):     at org.sqldroid.SQLDroidPreparedStatement.executeQuery(SQLDroidPreparedStatement.java:212)

Kristian Lein-Mathisen

unread,
Nov 14, 2013, 4:43:36 AM11/14/13
to <sqldroid@googlegroups.com>


Hi Sanjay!

I fear this group has gone quiet, but you could give github issues a try:

https://github.com/SQLDroid/SQLDroid

K.

--
You received this message because you are subscribed to the Google Groups "SQLDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jim Redman

unread,
Nov 14, 2013, 10:11:36 AM11/14/13
to sqld...@googlegroups.com
Sorry, I'm pretty busy and so haven't been in the SQLDroid world much
(except as a user).

Also, unfortunately I have no real response to your problem. However, I
do not think that SQLDroid is closing connection - it really doesn't
track connection or open an close them except under application logic
control. That said, the underlying Android classes may be doing some of
these types of things, but I doubt it.

If you feel up to it, you could grab the source and just put a
breakpoint or a log output on the connection close and see how it gets
there.

Jim

On 11/14/2013 02:43 AM, Kristian Lein-Mathisen wrote:
>
> Hi Sanjay!
>
> I fear this group has gone quiet, but you could give github issues a try:
>
> https://github.com/SQLDroid/SQLDroid
>
> K.
>
> On Nov 2, 2013 1:27 AM, "Sanjay Kumar" <hyper...@gmail.com
> <mailto:sqldroid%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to the Google
> Groups "SQLDroid" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqldroid+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Jim Redman
(505) 662 5156 x85
http://www.ergotech.com
Reply all
Reply to author
Forward
0 new messages