Bugs item #2812963, was opened at 2009-06-26 22:18
Message generated for change (Comment added) made by mr-meltdown
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2812963&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/JDBC
Group: SQL "stable"
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Gábor (feherg)
Assigned to: Fabian (mr-meltdown)
Summary: JDBC connection hangs if result is too long
Initial Comment:
Operating System: openSUSE 11.1
Compiler: gcc-4.3-34.243
Parser tools: package lex is not installed; flex-2.5.35-43.23; package yacc is
not installed; bison-2.3-127.26
More tools: autoconf-2.63-1.136; automake-1.10.1-4.284; libtool-2.2.6-1.35
MonetDB version: May2009 from source (with a recent head checkout of
buildtools, and binary distribution of JDBC)
Loaded MonetDB modules: sql; xml; batxml; geom;
Java 1.5.0 is used.
It seems to me that if a large number of bytes is received through a JDBC
connection, a "ResultSet is closed!" exception is thrown:
Exception in thread "main" java.sql.SQLException: ResultSet is closed!
at nl.cwi.monetdb.jdbc.MonetResultSet.absolute(MonetResultSet.java:181)
at nl.cwi.monetdb.jdbc.MonetResultSet.relative(MonetResultSet.java:2024)
at nl.cwi.monetdb.jdbc.MonetResultSet.next(MonetResultSet.java:1991)
at MonetJDBC.query(MonetJDBC.java:76)
at MonetJDBC.main(MonetJDBC.java:31)
I can reproduce this with my atteched java program. First it generates a table
with 3000 rows, and then issues a query on it...
----------------------------------------------------------------------
>Comment By: Fabian (mr-meltdown)
Date: 2009-10-01 13:03
Message:
fix delivered in Aug2009-SP1 release.
----------------------------------------------------------------------
Comment By: Fabian (mr-meltdown)
Date: 2009-09-23 22:18
Message:
Ok, I "fixed" this in the stable branch, if you could test whether this
works for your real application that would be nice. Please keep an eye on
memory usage if you can.
----------------------------------------------------------------------
Comment By: Fabian (mr-meltdown)
Date: 2009-09-23 21:38
Message:
ok, for some reason the Java garbage collector thinks the resultset you're
accessing is actually collectable, and hence calls finalize() on it, with
the obvious result...
I'm still in the dark why the garbage collector thinks the resultset is
collectable, as the main thread clearly has a reference to it.
----------------------------------------------------------------------
Comment By: Fabian (mr-meltdown)
Date: 2009-09-23 20:56
Message:
hmmm, I had a problem to compile your example:
[javac] Compiling 2 source files to
/export/scratch/mirror/fabian/monetdb/stable/java/tests/build
[javac]
/export/scratch/mirror/fabian/monetdb/stable/java/tests/BugLargeBytes_SF_2812963.java:51:
cannot find symbol
[javac] symbol : method format(java.lang.String,int)
[javac] location: class java.lang.String
[javac] String.format("insert into
jdbc_test (x) values (%1$d)", i);
[javac] ^
[javac] 1 error
But with some modifications, I can reproduce the error.
----------------------------------------------------------------------
Comment By: Fabian (mr-meltdown)
Date: 2009-09-23 13:49
Message:
Hi Gábor,
I'm sorry not to have noticed this bug (and your program to reproduce it)
sooner! I will study your example code soon and hopefully fix this bug.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2812963&group_id=56967
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs