org.hibernate.PropertyValueException: not-null property references a null or transient value : example.RelatedEntities.entity2

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

Solutions on the web

via Hibernate JIRA by Amar Laddha, 1 year ago
not-null property references a null or transient value : example.RelatedEntities.entity2
via Hibernate JIRA by Amar Laddha, 1 year ago
not-null property references a null or transient value : example.RelatedEntities.entity2
via Stack Overflow by user2610175
, 2 years ago
not-null property references a null or transient value: net.shopxx.entity.Bom.member
via Stack Overflow by Kleber Mota
, 2 years ago
not-null property references a null or transient value : com.spring.loja.model.pagina.persistence.model.Pagina.nome
via Stack Overflow by Kleber Mota
, 2 years ago
not-null property references a null or transient value : com.spring.loja.model.pagina.persistence.model.Pagina.nome
org.hibernate.PropertyValueException: not-null property references a null or transient value : example.RelatedEntities.entity2
at org.hibernate.engine.internal.Nullability.checkNullability(Nullability.java:92)
at org.hibernate.action.internal.AbstractEntityInsertAction.nullifyTransientReferencesIfNotAlready(AbstractEntityInsertAction.java:115)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:69)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:597)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:232)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:213)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:256)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113)
at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58)
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:778)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:751)

Users with the same issue

Once, 3 months ago
Once, 6 months ago
79 times, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

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