Hi guys, please help if you can!
I am using Hibernate with HSQLDB. I have a file-based HSQL database called "testdb".
The problem is, when I try to connect to my HSQL file-string URL, the
application hangs.
It hangs right after this Hibernate output:
Code:
INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:testdb
INFO: connection properties: {user=SA, password=****}
Note that the problem does
not happen with In-Memory HSQL. If the URL is "jdbc:hsqldb:
mem:testdb" everything works. So it's a File-specific issue.
I verified in Hibernate that the DB exists, the HSQL file exists, I have my tables there and can browse them.
What's the problem? Why does the app hang on File? (There are even no error messages.) Thanks a lot.
My hibernate.cfg.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:file:testdb</property>
<property name="connection.username">SA</property>
<property name="connection.password"></property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">2</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup
<property name="hbm2ddl.auto">create</property>-->
<mapping resource="techbooks/hibernate/Movie.hbm.xml"/>
</session-factory>
</hibernate-configuration>