[jboss-user] [JBoss Seam] - Seam 1.1.6 and Hibernate validation problem

frehan do-not-reply at jboss.com
Fri Mar 2 09:19:45 EST 2007


Hi!

I have a registration page for users to register. The entity class uses 
@Email to validate the entered email adress. 

In my registration jsp form I use   <s:validateAll> arround the input fields.
and the email  is a none required field. So it could be empty but if entered it must validate to a correct adress.

When i try to save the entity with an empty email field I get the following error.

Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=Transaction
Impl:XidImpl[FormatId=257, GlobalId=seit1497/470, BranchQual=, localId=470] stat
us=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceExce
ption: org.hibernate.AssertionFailure: null id in se.camitz.par.User entry (don't flush the Session after an exception occurs))
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(Serve
rVMClientUserTransaction.java:140)
        at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(Abstrac
tSeamPhaseListener.java:287)
        ... 35 more

I get an org.hibernate.AssertionFailure failure telling me that my entity has a null Id..
IF I enter a correct email then everything works fine.

Does anybody know why I get this kind of error?

Best regards Fredrik

 




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

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



More information about the jboss-user mailing list