• 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: 17309
11
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
 
This will take every ounce of my mental strength! All for a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!