File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate newbie - Data sequence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate newbie - Data sequence " Watch "Hibernate newbie - Data sequence " New topic

Hibernate newbie - Data sequence

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 116

I have problem running this hibernate project for Data sequence.

I am providing the details below

I am using Eclipse.

I have created a table in Apache Derby as follows

My Java file is as follows

My book.hbm.xml file is as follows(same directory as Bookch2)

My hibernate.cfg.xml is as follows

The client code is as follows

I am getting the following error when i run the Launch_2_1

Could anyone of you all please help me out with this code. What am i doing wrong.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
Charan kumar sarvepalli
Ranch Hand

Joined: Dec 14, 2008
Posts: 40
Derby does not support sequences like Oracle, but it supports identity columns.

check this is thread

-- Charan
I agree. Here's the link:
subject: Hibernate newbie - Data sequence
It's not a secret anymore!