Closed GoogleCodeExporter closed 9 years ago
Original comment by galgwt.reviews@gmail.com
on 12 May 2008 at 12:34
In firebug, I see the following message:
SQLite prepare() failed. ERROR: SQL logic error or missing database DETAILS:
table
notes already exists EXPRESSION: create table notes (noteid text not null
primary
key, version text not null, content text not null)
[Break on this error] undefined
But I don't get my alerts called. Here is an example from a modified version
of the
GWTNote sample code:
private static final String DB_CREATE = "create table notes ("
+ "noteid text not null primary key, version text not null, "
+ "content text not null)";
try {
db = new Database();
try {
ResultSet r = db.execute(DB_CREATE);
Window.alert("Create went pretty good." + (r == null ? "<null>" : r.toString()));
if (r != null) {
r.close();
}
} catch (DatabaseException dbEx) {
// Creating a database more than once should not throw an exception.
Window.alert("Exception creating database: " + dbEx.getMessage());
// fall through
} catch (Throwable t) {
Window.alert("Exception creating database: " + t.getMessage());
// fall through
}
Original comment by galgwt.reviews@gmail.com
on 12 May 2008 at 3:55
A bit of debugging with bobv: The problem appears to be related to Firefox.
Running some tests on InternetExplorer, the alert boxes show up where I expect
them.
One suggestion from Bob, was to move the exception handling into the JSNI
nativeExecute() method and then create a Java DatabaseException object there.
Looking at the generated code, it would be easy for the JavaScript compiled
version
to 'miss' when doing a comparison by type.
Original comment by galgwt.reviews@gmail.com
on 12 May 2008 at 4:59
The attached patch updates the DatabaseTest class. When you run this test on
Firefox, the testDoubleCreate() method hangs indefinitely.
Original comment by galgwt.reviews@gmail.com
on 13 May 2008 at 2:07
Attachments:
Tried to reproduce this test case in pure JavaScript outside of GWT. I can't
make it
fail in Firefox for Mac or Linux.
Original comment by ericzun...@gmail.com
on 15 May 2008 at 1:37
Attachments:
I just found that if I move the database initialization code outside of
onModuleLoad() that I can catch the exceptions as usual.
Original comment by ericzun...@gmail.com
on 15 May 2008 at 6:53
After some emails to the Gears project, they suggesed I file an issue. See
issue 504
in the Gears project:
http://code.google.com/p/google-gears/issues/detail?id=504
Original comment by galgwt.reviews@gmail.com
on 21 May 2008 at 9:51
The Gears team will notify us when they make a determination, in the mean time,
no
action is needed by the GWT team.
Original comment by galgwt.reviews@gmail.com
on 18 Jun 2008 at 7:51
Original comment by galgwt.reviews@gmail.com
on 18 Jun 2008 at 7:51
s/b fixed in the next release of Google Gears:
Issue 504: Using Database execute method in some contexts results in an
uncatchable
exception
http://code.google.com/p/gears/issues/detail?id=504
Comment #2 by zboogs:
I verified this in 0.3.21.0 and 0.3.24.0, but it is fixed in trunk. Not sure
when it
happened.
Issue attribute updates:
Status: Fixed
Original comment by galgwt.reviews@gmail.com
on 30 Jun 2008 at 1:03
This is not a GWT problem. It should be addressed in the next Gears push.
Original comment by mmendez+personal@google.com
on 23 Jul 2008 at 3:19
Original comment by zundel@google.com
on 21 Dec 2009 at 1:22
Original comment by zundel@google.com
on 21 Dec 2009 at 1:24
Original issue reported on code.google.com by
galgwt.reviews@gmail.com
on 12 May 2008 at 12:33