I have a similar problem.
My Slsb have method:
| public void addUser(User user) throws Exception {
| try {
| em.persist(user);
| em.flush();
| } catch (ConstraintViolationException e) {
| throw new UserAlreadyExistsException(
| "User already exist!", e);
| } catch (PropertyValueException e) {
| throw new PropertyInvalidException(e.getEntityName(),
e.getPropertyName());
| }
| }
|
UserAlreadyExistsException it is caught, but if i catch PropertyValueException,
PropertyInvalidException not rise!
Client recive:
| java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to
commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=lserver/68,
BranchQual=, localId=68] status=STATUS_NO_TRANSACTION; - nested throwable:
(org.hibernate.PropertyValueException: not-null property references a null or
transient value: ru.migusoft.ent.persist.security.User.accountName)
Where I should catch PropertyValueException exception?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913040#3913040
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913040
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user