wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes HSQLDB & Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "HSQLDB & Hibernate" Watch "HSQLDB & Hibernate" New topic
Author

HSQLDB & Hibernate

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I am adding two rows to my table via hibernate and it is showing them up in console. But the table "Messages" does not exist in HSQLDB.


What may be the reason? Am I missing on HSQLDB configuration?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Take a look to hibernate.hbm2ddl.auto
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I have set it to "create" in my configuration. It still doesn't create the table, hibernate code is however generating two rows and displaying them off.
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Are you running HSQLDB in server mode?

What IDE do you use to browse the database?

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Carles Gasques wrote:Are you running HSQLDB in server mode?

What IDE do you use to browse the database?



I use following command to view the database

It opens up a connect UI where in i supply these settings
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I think it works but changes are not immediate and very sporadic as after running following code, the output shows three messages


However in db there are only two old rows, "Hello world!" and "Hello worlds!"

Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,
Try to run your database in server mode Hsqldb Server and then browse with the IDE.


Best reggards,

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Carles Gasques wrote:Hi,
Try to run your database in server mode Hsqldb Server and then browse with the IDE.


Best reggards,


Thanks. The server started normally


But the UI pops up a message
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,

I understand that if you run a database with the command
the connection string would be

Cheers,
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Thanks a ton. It works.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HSQLDB & Hibernate
 
Similar Threads
where can I find persistence.HibernateUtil
Class HibernateUtil cannot be resolved
Seems to insert but doesn't end up in the database
Hibernate - Cascading problems using ManyToOne association
save an array to database with hibernate