Skip to main content

Posts

Showing posts with the label JEE

javax.validation.ConstraintViolationException: validation failed for classes [*] during update time for groups [javax.validation.groups.Default, ]

This message wasted many hours to figure out the solution. javax.validation.ConstraintViolationException: validation failed for classes [*] during update time for groups [javax.validation.groups.Default, ] When I applied the validation as following, I found that the confirmPassword is the field causing validation error. ValidatorFactory factory = Validation.buildDefaultValidatorFactory();         Validator validator = factory.getValidator();                 Set<ConstraintViolation<User>> constraintViolations = validator.validate(user);         System.out.println("constraintViolations.size : "+constraintViolations.size());         Iterator<ConstraintViolation<User>> iterator = constraintViolations.iterator();         while (iterator.hasNext()) {       ...

WARNING: SQL Error: 1062, SQLState: 23000 SEVERE: Duplicate entry '*' for key '************'

May 14, 2013 4:35:23 PM org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 1062, SQLState: 23000 May 14, 2013 4:35:23 PM org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Duplicate entry '2' for key 'navigation_id' May 14, 2013 4:35:23 PM org.hibernate.event.def.AbstractFlushingEventListener performExecutions SEVERE: Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)     at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:183)     at o...