Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLGrammarException: could not get next sequence value

 
Jian Yi
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the whole error message:
 
Jian Yi
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. I got it working.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And was it because it didn't have the sequence name in your mapping?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic