[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JPA Peristence exception Hibernate, Derby: could not get nex
richkatz
do-not-reply at jboss.com
Thu Apr 30 14:44:46 EDT 2009
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:
@Id
@Column(name="UserID")
@GeneratedValue(strategy=GenerationType.AUTO)
The identity column in Derby is defined in the create table command as:
UserID INT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
Many thanks.
Regards,
Rich Katz
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227886#4227886
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227886
More information about the jboss-user
mailing list