10

We have a desktop application with a local HSQLDB database. Some customers have reported their application stops working. When I try to open it with DbVisualizer I can see this on debug console:

12:45:32 [DEBUG pool-2-thread-1 D.?] RootConnection:     jdbcDriver.connect("jdbc:hsqldb:C:\test\database.db", {user=**, password=})
java.sql.SQLException: error in script file line: 56 out of memory
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbcDriver.connect(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.onseven.dbvis.d.B.D.?(Z:1548)
    at com.onseven.dbvis.d.B.F$A.call(Z:278)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Anybody knows something to do to open this and analyze what is the problem?

Daniel Albert
  • 757
  • 5
  • 22

3 Answers3

7

Usually, this exception occurs when the database is corrupted. Try with a backup of the database. See here for another discussion regarding this topic.

Community
  • 1
  • 1
Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • Hi Ingo, thanks for your answer. I'm trying to discover if there is a way to analyze a corrupted database, nor preventing this. – Daniel Albert May 07 '12 at 11:12
  • I don't think there is such a tool. – Ingo Kegel May 07 '12 at 12:59
  • No, there is not. If you have the database ".script" file, it may be possible to fix it manually if the corruption is small and located... Do copies, edit and try to load. After a while you may give up. Good luck. – Yves Martin May 10 '12 at 06:54
0

You can get this error when opening an HSQLDB database using an incompatible driver version. For example, I receive it when using version 2.2.8 to open an HSQLDB database saved with version 1.8.1.3. I use SQuirrel to view these databases and must set up a few different drivers to support each version. I imagine DB Visualizer has a similar capability.

SingleShot
  • 18,821
  • 13
  • 71
  • 101
0

Make sure that if the database is very large that you allocate more memory to the heap. see Java heap space out of memory