This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 113

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
Similar Threads
MySQLSyntaxErrorException: Access denied
Hibernate: Mapping a sequence to a serial (autoincr) field (Postgresql)
org.hibernate.MappingException: entity class not found:
org.hibernate.exception.SQLGrammarException: could not insert:
Collection Mapping