<< Back to previous view

[JDBC-94] Parsing of sqlite or HSQLDB in-memory databases fail Created: 01/Apr/14  Updated: 01/Jun/16  Resolved: 30/Jun/14

Status: Closed
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Peter Schwarz Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: bug

Using the following driver dependencies:
[org.hsqldb/hsqldb "2.3.2"]
[org.xerial/sqlite-jdbc "3.7.2"]


When entering a sqlite memory db uri: "jdbc:sqlite::memory:", the following error occurs:

SQLException out of memory org.sqlite.DB.throwex (DB.java:370)

This is a vague exception which occurs when the db is not actually created (see https://bitbucket.org/xerial/sqlite-jdbc).

Likewise, when parsing a HSQLDB in-memory db url: "jdbc:hsqldb:mem:testdb", the following error occurs:

2014-04-01T14:13:11.996-0500  SEVERE  could not reopen database
org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@2be0e04[file =/.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: /.lck (Permission denied)

It appears to be creating the equivalent connection for

{:subprotocol "hsqldb" :subname ""}
but should be creating
{:subprotocol "hsqldb" :subname "mem:testdb" }

Comment by Sean Corfield [ 01/Apr/14 3:17 PM ]

Thanx Peter. That sounds reasonably easy to repro so I'll create a couple of test cases shortly.

Comment by Sean Corfield [ 30/Jun/14 9:09 PM ]

Finally taking a look at these - sorry for the delay - and it seems that java.jdbc expects a string argument to be something you can simply construct a URI out of and then pass to get-connection so this suggests that either java.net.URI might be monkeying with the value or parse-properties-uri can't figure out how to reconstruct the appropriate spec map from such a URI.

Comment by Sean Corfield [ 30/Jun/14 9:34 PM ]

Will be in 0.3.5.

Generated at Sat Dec 10 01:24:27 CST 2016 using JIRA 4.4#649-r158309.