diff --git a/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java b/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java index 479a11fbff..a0fd3697d5 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java +++ b/modules/gui/src/com/haulmont/cuba/gui/exception/UniqueConstraintViolationHandler.java @@ -38,8 +38,7 @@ public class UniqueConstraintViolationHandler implements GenericExceptionHandler Throwable t = exception; try { while (t != null) { - if (t.toString().contains("org.springframework.dao.DataIntegrityViolationException") - || t.toString().contains("org.springframework.orm.jpa.JpaSystemException")) { + if (t.toString().contains("org.eclipse.persistence.exceptions.DatabaseException")) { return doHandle(t, windowManager); } t = t.getCause();