score:1

the meaning of your exception is id have not setted correctly.the error is in your mapping.if your are using sequence for incrementing id you must also do this in mapping.try following:

@generatedvalue(generator = "yoursequencename", strategy=generationtype.sequence)
private int id;

i hope this will help you.


Related Query

More Query from same tag