javax.validation.ConstraintViolationException: Validation failed for classes [com.entities.MyEntity] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='Enter a number', propertyPath=TrxNumber, rootBeanClass=class com.entities.MyEntity, messageTemplate='Enter a number'} ]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by dwix
, 1 year ago
Validation failed for classes [com.entities.MyEntity] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='Enter a number', propertyPath=TrxNumber, rootBeanClass=class com.entities.MyEntity, messageTemplate='Enter a number'} ]
via GitHub by chomnoue
, 2 months ago
Validation failed for classes [com.chomnoue.bookshop.domain.User] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='size must be between 5 and 100
via baidu.com by Unknown author, 2 years ago
Validation failed for classes [com.wyb.entity.site.SiteContent] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage=' ÄÜ null', propertyPath=type
via Stack Overflow by Artin
, 3 months ago
Validation failed for classes [mobi.puut.entities.WalletInfo] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=id
via Stack Overflow by jodekpotasu
, 1 year ago
Validation failed for classes [com.serwis.model.User] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=password
via coderanch.com by Unknown author, 8 months ago
Validation failed for classes [modele.DAO.beans.user.User] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='ne peut pas être vide', propertyPath
javax.validation.ConstraintViolationException: Validation failed for classes [com.entities.MyEntity] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='Enter a number', propertyPath=TrxNumber, rootBeanClass=class com.entities.MyEntity, messageTemplate='Enter a number'} ]
at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:160)
at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:95)
at org.hibernate.action.internal.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:214)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:92)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:492)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:197)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:181)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:216)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:334)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:289)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195)
at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84)
at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75)
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:811)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:784)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181)

Users with the same issue

2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
8 times, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.