1

Again the same problem! The exception comes if I annotate the ID with @Id.

@ForeignKey(name = "User") 
public String He;
@ForeignKey(name = "User") 
public String Him;
@Id @GeneratedValue(strategy=GenerationType.AUTO) 
public int f_id;

But if I annotate some other String attribute, the error goes away. What can be the problem, can anyone help me pls?

What is the "evolutionsplugin=disabled" in conf file? Isn't it causing the issue?

dda
  • 6,030
  • 2
  • 25
  • 34
doniyor
  • 36,596
  • 57
  • 175
  • 260
  • i solved it in an informal way: i created another String attribute which i marked as primary key thru @Id and this is now working. but my question is still open why it is not working on INTEGER ID.. that would be perfect way of doing my job actually.. – doniyor Jul 01 '12 at 06:33
  • Please have a look at http://stackoverflow.com/questions/11260757/persistenceexception-error-getting-sequence-nextval. – Chetter Hummin Jul 01 '12 at 06:53
  • yeah thanks, that was my own post. it is working now anyway.. i think i have to read the jdbc driver + h2 + persistence books in peace.. – doniyor Jul 01 '12 at 07:02
  • 1
    Heh. My bad. Just browsed it. – Chetter Hummin Jul 01 '12 at 07:08
  • 1
    try using an `Integer` instead of an `int`. – ndeverge Jul 01 '12 at 13:08
  • Okay, i will try. what i did now is i chose another key as primary key and now all ids are 0. which is more than worse. – doniyor Jul 02 '12 at 06:16

0 Answers0