I can not say what exactly is the problem but i will recommend you to follow this as this might be helpful for you.
ID Generation Type: SEQUENCE : Generated IDJPAJava Tutorial
Type: Posts; User: Mr.777
I can not say what exactly is the problem but i will recommend you to follow this as this might be helpful for you.
ID Generation Type: SEQUENCE : Generated IDJPAJava Tutorial
What is the data type of the field you trying to generate Primary Key for?