[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Failure to get next in sequence - EBJ3 CMP entity bean

fbadt do-not-reply at jboss.com
Fri Aug 25 19:44:19 EDT 2006


Could you please look at the below errors and suggest what is going on and how to fix it?

javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not get next sequence value
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)


The EJB is annotated as:
==== class
@Entity
@Table(name="equifax_request")
@TransactionManagement(TransactionManagementType.CONTAINER)

==== pk id annotation
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="WW")
@SequenceGenerator(name="WW", sequenceName="my_seq")
@Column(name="eqrq_no", nullable=false, insertable=true )

This is an informix 9.4 DB with the IBM informix drivers and Hibernate Persistence in JBoss 4.04 I have verified that the sequence exists. I have also successfully used iSQL (java sourceforge sql tool) to run the logged hibernate query of:
select my_seq.nextval from systables where tabid=1

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

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



More information about the jboss-user mailing list