Does any one know what causes this?
What do I do to get around it either using annotations or using XML?
The exact problem is that when JPA invokes TableGenerator it execute the following SQL command on Derby:
select next_hi from hibernate_unique_key for read only with rs
It encouters the following error:
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get or update next value
Caused by: java.sql.SQLException: Table/View 'HIBERNATE_UNIQUE_KEY' does not exist.
Derby does not have sequence tables.
We are using:
The identity column in Derby is defined in the create table command as:
UserID INT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,