org.springframework.orm.hibernate3.HibernateSystemException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi

Hibernate JIRA | Ted Bergeron | 1 decade ago
  1. 0

    Originally posted on the forums: http://forum.hibernate.org/viewtopic.php?t=955445 Created a "simple" test case. (Are dao tests ever really simple?) Have a simple CreditCard, has a Contact, which has an Address. contact first and lastname are @NotNull. contact.mi and address.address2 are both optional fields. TestDaoHibernateJira.java sets up the object chain with all properties populated. The validator runs and asserts no invalidValues. The test case then sets mi and address2 to null. The validator is run again, and asserts no invalidValues. hibernate's saveOrUpdate(creditCard) method is called via the dao. When run, first hibernate reads the next creditcard id from the sequence. Then we get: org.springframework.orm.hibernate3.HibernateSystemException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi at org.hibernate.engine.Nullability.checkNullability(Nullability.java:84) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:529) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:521) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:517) at org.springframework.orm.hibernate3.HibernateTemplate$18.doInHibernate(HibernateTemplate.java:690) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365) at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:687) at com.viz.web.persistence.hibernate.BaseDaoHibernate.save(BaseDaoHibernate.java:121) at org.hibernate.jiratest.TestDaoHibernateJira.testValidatorAndSave(TestDaoHibernateJira.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)

    Hibernate JIRA | 1 decade ago | Ted Bergeron
    org.springframework.orm.hibernate3.HibernateSystemException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi
  2. 0

    Apache Wicket - Error attaching this container for rendering

    nabble.com | 1 year ago
    org.springframework.orm.hibernate3.HibernateSystemException: Null value was assigned to a property of primitive type setter of com.acai.smsplatform.model.user.Sender.scheduledPermission; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.acai.smsplatform.model.user.Sender.scheduledPermission
  3. 0

    Error while running Issue search in Itracker 3.1.2

    itracker | 4 years ago | jayadev-devdas
    org.springframework.orm.hibernate3.HibernateSystemException: Null value was assigned to a property of primitive type setter of org.itracker.model.Report.dataType; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.itracker.model.Report.dataType
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HibernateSystemException: Null value was assigned to a property of primitive type setter of ru.runa.wfe.bot.BotTask.sequentialExecution

    runawfe | 2 years ago | vromav
    org.springframework.orm.hibernate3.HibernateSystemException: Null value was assigned to a property of primitive type setter of ru.runa.wfe.bot.BotTask.sequentialExecution; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of ru.runa.wfe.bot.BotTask.sequentialExecution
  6. 0

    Express / Discussion / Help:Problems adding acceptance criteria

    sourceforge.net | 6 months ago
    org.springframework.orm.hibernate3.HibernateSystemException: could not get a field value by reflection getter of com.express.domain.AcceptanceCriteria.id; nested exception is org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.express.domain.AcceptanceCriteria.id

    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. org.springframework.orm.hibernate3.HibernateSystemException

      not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi org.hibernate.PropertyValueException: not-null property references a null or transient value: org.hibernate.jiratest.CreditCard.contact.mi

      at org.hibernate.engine.Nullability.checkNullability()
    2. Hibernate
      Nullability.checkNullability
      1. org.hibernate.engine.Nullability.checkNullability(Nullability.java:84)
      1 frame
    3. Hibernate
      SessionImpl.saveOrUpdate
      1. org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
      2. org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
      3. org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
      4. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
      5. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
      6. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
      7. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
      8. org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:529)
      9. org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:521)
      10. org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:517)
      10 frames
    4. Hibernate
      HibernateTemplate.saveOrUpdate
      1. org.springframework.orm.hibernate3.HibernateTemplate$18.doInHibernate(HibernateTemplate.java:690)
      2. org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
      3. org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:687)
      3 frames
    5. com.viz.web
      BaseDaoHibernate.save
      1. com.viz.web.persistence.hibernate.BaseDaoHibernate.save(BaseDaoHibernate.java:121)
      1 frame
    6. org.hibernate.jiratest
      TestDaoHibernateJira.testValidatorAndSave
      1. org.hibernate.jiratest.TestDaoHibernateJira.testValidatorAndSave(TestDaoHibernateJira.java:74)
      1 frame
    7. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3 frames
    8. com.intellij.rt
      JUnitStarter.main
      1. com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
      1 frame