Not-null constraint violation

org.hibernate.PropertyValueException
Javadoc
Thrown when the (illegal) value of a property can not be persisted. There are two main causes:
  • a property declared not-null="true" is null
  • an association references an unsaved transient instance
@author Gavin King
at org.hibernate.engine.internal.Nullability.checkNullability
(source)

Typical Exception Messages

  1. not-null property references a null or transient value: org.yamj.core.database.model.FilmParticipation.jobType; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.yamj.core.database.model.FilmParticipation.jobType
  2. not-null property references a null or transient value : com.spring.loja.model.pagina.persistence.model.Pagina.nome
  3. Exception running workflow
  4. not-null property references a null or transient value : Address.user
  5. not-null property references a null or transient value: net.shopxx.entity.Bom.member
  6. not-null property references a null or transient value: com....db.taskmanager.DamagedTask.assigned_agent
  7. not-null property references a null or transient value : Address._Person.addressesBackref
  8. not-null property references a null or transient value: org.broadleafcommerce.profile.core.domain.PhoneImpl.phoneNumber
  9. not-null property references a null or transient value : com.sample.Answer.question
  10. org.hibernate.PropertyValueException: not-null property references a null or transient value : edu.pitt.sis.exp.colfusion.dal.orm.ColfusionRelationshipsColumnsDataMathingRatios.colfusionProcesses

Specific cases

Solution

Mohd Salauddin, 3 months ago

Tried to save an entity which has null value on a field with @Nullable = false on it. You either set @Nullable = true or make sure that the field is not null on write.

External results for this pattern (32)

  1. f1gjamvia GitHub2 months ago
    Exception running workflow
    Show stack trace
  2. f1gjamvia GitHub2 months ago
    Exception running workflow
    Show stack trace
  3. bharathvia Stack Overflow3 months ago
    not-null property references a null or transient value : com.rasvek.cms.entity.State.country
    Show stack trace
  4. Unknown authorvia Stack Overflow4 months ago
    not-null property references a null or transient value : com.mad.app.domain.DemandLedgerMap.demandLedger; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value : com.mad.app.domain.DemandLedgerMap.demandLedger
    Show stack trace
  5. bharathvia Stack Overflow5 months ago
    not-null property references a null or transient value : com.rasvek.cg.entity.FeeTermDates.feeTerms
    Show stack trace
  6. Daniel Kayiwavia JIRA5 months ago
    not-null property references a null or transient value : org.openmrs.AllergyReaction.allergy
    Show stack trace
  7. not-null property references a null or transient value : com.htss.market.dao.Seller.companyType; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value : com.htss.market.dao.Seller.companyType
    Show stack trace
  8. varunkrvia Stack Overflow5 months ago
    not-null property references a null or transient value : my.app.DB.models.People.job
    Show stack trace
  9. Jeremy Carnusvia Hibernate JIRA5 months ago
    not-null property references a null or transient value :
    Show stack trace
  10. Amar Laddhavia Hibernate JIRA5 months ago