[jboss-user] [JBoss Seam] - HibernateException: Missing sequence or table

cparham do-not-reply at jboss.com
Tue Mar 6 22:12:58 EST 2007


Hello:

I'm trying to deploy a Seam app that uses an entity bean to persist data. For some reason, when I deploy, I get the following exception:


  | 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(HibernatePersistence.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:

  | @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:

  | SELECT FRAMEWK.RECORD_SEQ.NEXTVAL FROM DUAL;
  | 

Does anyone know what the problem is?

Thanks!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025657#4025657

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025657



More information about the jboss-user mailing list