File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLGrammarException: could not get next sequence value

 
Jian Yi
Ranch Hand
Posts: 127
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the whole error message:
 
Jian Yi
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. I got it working.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • 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