javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ]

SpringSource Issue Tracker | Kyle McCaffrey | 5 years ago
  1. 0

    ConstraintViolation when field labeled @NotNull and @OneToOne - Spring Forum

    spring.io | 11 months ago
    javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ]
  2. 0

    Working on a project with the following: [code] persistence setup --provider HIBERNATE --database ORACLE entity --class ~.ItemStatus field string --fieldName name --notNull entity --class ~.ItemState --testAutomatically field reference --type ~.ItemStatus status --cardinality ONE_TO_ONE --notNull field date --type java.util.Date --fieldName statusDate --notNull field boolean --fieldName currentState --notNull [/code] When I run a mvn compile, I get a notice about failed tests, with the following result: [code] ------------------------------------------------------------------------------- Test set: test.ItemStateIntegrationTest ------------------------------------------------------------------------------- Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.077 sec <<< FAILURE! testFlush(test.ItemStateIntegrationTest) Time elapsed: 0.014 sec <<< ERROR! javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ] at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:161) at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94) at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:178) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ... [/code]

    SpringSource Issue Tracker | 5 years ago | Kyle McCaffrey
    javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ]
  3. 0

    Working on a project with the following: [code] persistence setup --provider HIBERNATE --database ORACLE entity --class ~.ItemStatus field string --fieldName name --notNull entity --class ~.ItemState --testAutomatically field reference --type ~.ItemStatus status --cardinality ONE_TO_ONE --notNull field date --type java.util.Date --fieldName statusDate --notNull field boolean --fieldName currentState --notNull [/code] When I run a mvn compile, I get a notice about failed tests, with the following result: [code] ------------------------------------------------------------------------------- Test set: test.ItemStateIntegrationTest ------------------------------------------------------------------------------- Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.077 sec <<< FAILURE! testFlush(test.ItemStateIntegrationTest) Time elapsed: 0.014 sec <<< ERROR! javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ] at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:161) at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94) at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:178) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ... [/code]

    SpringSource Issue Tracker | 5 years ago | Kyle McCaffrey
    javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bean validation on JBoss seam and JPA (Hibernate)

    Stack Overflow | 5 years ago | Gyowanny Pessatto Queiroz
    javax.validation.ConstraintViolationException: validation failed for classes [br.com.rcetecnologia.model.Orcamento] during persist time for groups [br.com.rcetecnologia.validator.annotations.ValidateOnPersistOnly, ]
  6. 0

    Hibenate Validator 4.1 - Assuntos Gerais - GUJ

    com.br | 11 months ago
    br.com.caelum.vraptor.InterceptionException: an exception was raised while executing resource method

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.validation.ConstraintViolationException

      Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ]

      at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate()
    2. Hibernate
      BeanValidationEventListener.onPreInsert
      1. org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:161)
      2. org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94)
      2 frames
    3. Hibernate
      EntityInsertAction.execute
      1. org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:178)
      2. org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72)
      2 frames
    4. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
      3 frames
    5. Hibernate
      SessionImpl.flush
      1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
      3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      3 frames