Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes SQLGrammarException: could not get next sequence value 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 "SQLGrammarException: could not get next sequence value" Watch "SQLGrammarException: could not get next sequence value" New topic
Author

SQLGrammarException: could not get next sequence value

Jian Yi
Ranch Hand

Joined: Feb 01, 2002
Posts: 127
Hi everyone,

I'm new to Hibernate. I tried to use the examples in book 'Hibernate Quickly', but using Oracle instead of MySQL. However I got the error:
Jian Yi
Ranch Hand

Joined: Feb 01, 2002
Posts: 127
Oops, sent out by mistake.

I mean to add the code and table here:

1. Event.java:


2. Event mapping file:


3. events table:



Anything else I should post here to be helpful to answer my question?

Thanks!
Jenny
Jian Yi
Ranch Hand

Joined: Feb 01, 2002
Posts: 127
Here is the whole error message:
Jian Yi
Ranch Hand

Joined: Feb 01, 2002
Posts: 127
Never mind. I got it working.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

And was it because it didn't have the sequence name in your mapping?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLGrammarException: could not get next sequence value
 
Similar Threads
Hibernate - SQLGrammarException : could not get next sequence value
Hibernate: ORM Mapping "Could not get next sequence value" SQLCODE: -142
[Hibernate] Please explain hilo generator
Hibernate- How get next value from a squence
Use of sequence without creating an entity