-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem Using Hibernate with HSQLDB
PostPosted: Fri Jun 10, 2011 6:54 pm 
Newbie

Joined: Fri Jun 10, 2011 6:50 pm
Posts: 1
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.