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
  2. not-null property references a null or transient value : com.spring.loja.model.pagina.persistence.model.Pagina.nome
  3. not-null property references a null or transient value : com.tremolosecurity.provisioning.objects.ApproverAttributes.value
  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. not-null property references a null or transient value : edu.pitt.sis.exp.colfusion.dal.orm.ColfusionRelationshipsColumnsDataMathingRatios.colfusionProcesses

Specific cases

Solution

Mohd Salauddin, 1 month 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 (33)

  1. f1gjamvia GitHub1 month ago
    not-null property references a null or transient value : com.tremolosecurity.provisioning.objects.ApproverAttributes.value
    Show stack trace
  2. f1gjamvia GitHub1 month ago
    not-null property references a null or transient value : com.tremolosecurity.provisioning.objects.ApproverAttributes.value
    Show stack trace
  3. bharathvia Stack Overflow2 months ago
    not-null property references a null or transient value : com.rasvek.cms.entity.State.country
    Show stack trace
  4. Unknown authorvia Stack Overflow2 months ago
    not-null property references a null or transient value : com.mad.app.domain.DemandLedgerMap.demandLedger
    Show stack trace
  5. bharathvia Stack Overflow3 months ago
    not-null property references a null or transient value : com.rasvek.cg.entity.FeeTermDates.feeTerms
    Show stack trace
  6. Daniel Kayiwavia JIRA3 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
    Show stack trace
  8. varunkrvia Stack Overflow3 months ago
    not-null property references a null or transient value : my.app.DB.models.People.job
    Show stack trace
  9. Jeremy Carnusvia Hibernate JIRA3 months ago
    not-null property references a null or transient value :
    Show stack trace
  10. zhouyanmingvia Hibernate JIRA3 months ago
    not-null property references a null or transient value : org.hibernate.bugs.Person.createDate
    Show stack trace