Hello:
I posted this in the Seam forum and someone suggested I post here...
I'm trying to deploy a Seam 1.2 (Hibernate 3.2.0, Oracle DB) app that uses an entity bean to persist data. For some reason, when I deploy, I get the following exception:
Code:
21:50:52,274 INFO [DatabaseMetadata] table not found: FRAMEWK.RECORD_SEQ
21:50:52,461 INFO [DatabaseMetadata] table not found: RECORD_SEQ
21:50:52,461 WARN [ServiceController] Problem starting service persistence.units:ear=testEnroll.ear
,jar=testEnroll.jar,unitName=testEnroll
javax.persistence.PersistenceException: org.hibernate.HibernateException: Missing sequence or table:
FRAMEWK.RECORD_SEQ
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersi
stence.java:127)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
...
This is how I've annotated the primary key in my entity:
Code:
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="RECORD_SEQ")
@SequenceGenerator(name="RECORD_SEQ", allocationSize=1, sequenceName="RECORD_SEQ")
public Long getRecord_Id() {
return record_Id;
}
I know the sequence exists because I can execute the following and get a value back:
Code:
SELECT FRAMEWK.RECORD_SEQ.NEXTVAL FROM DUAL;
Is the problem because Hibernate is looking for a table instead of a sequence? Notice this line in the error:
Code:
21:50:52,461 INFO [DatabaseMetadata] table not found: RECORD_SEQ
Does anyone know what the problem is? Or, please excuse me if I've missed something obvious.
Thanks!