Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate cannot connect to HSQLDB File-Based DB, hangs
    text
    copied!<p>I am using Hibernate with HSQL DB. I have a file-based HSQL database called "testdb".</p> <p>When I try to connect to my HSQL file-string URL, my application hangs.</p> <p>It hangs right after this Hibernate output:</p> <pre><code>INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:testdb INFO: connection properties: {user=SA, password=****} </code></pre> <p>Note that the problem does <strong>not</strong> happen with In-Memory HSQL. If the URL is "jdbc:hsqldb:<strong>mem</strong>:testdb" everything works. So it's a File setting issue.</p> <p>I verified in Hibernate that the DB exists, the HSQL file exists, I have my tables there and can browse them.</p> <p>In fact, even when I specify a non-existent file in File:, it still hangs. What am I doing wrong? Thanks</p> <p>My hibernate.cfg.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;!-- Database connection settings --&gt; &lt;property name="connection.driver_class"&gt;org.hsqldb.jdbcDriver&lt;/property&gt; &lt;property name="connection.url"&gt;jdbc:hsqldb:file:testdb&lt;/property&gt; &lt;property name="connection.username"&gt;SA&lt;/property&gt; &lt;property name="connection.password"&gt;&lt;/property&gt; &lt;!-- JDBC connection pool (use the built-in) --&gt; &lt;property name="connection.pool_size"&gt;2&lt;/property&gt; &lt;!-- SQL dialect --&gt; &lt;property name="dialect"&gt;org.hibernate.dialect.HSQLDialect&lt;/property&gt; &lt;!-- Echo all executed SQL to stdout --&gt; &lt;property name="show_sql"&gt;true&lt;/property&gt; &lt;!-- Drop and re-create the database schema on startup --&gt; &lt;property name="hbm2ddl.auto"&gt;create&lt;/property&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload