"IllegalArgumentException: attempt to create saveOrUpdate event with null entity" in Hibernate

Solution Verified - Updated -

Issue

  • Encountering the exception below when saving an entity

    java.lang.IllegalArgumentException: attempt to create saveOrUpdate event with null entity
            at org.hibernate.event.SaveOrUpdateEvent.<init>(SaveOrUpdateEvent.java:63)
            at org.hibernate.event.SaveOrUpdateEvent.<init>(SaveOrUpdateEvent.java:46)
            at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:529)
            at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:525)
            at org.my.co.MyDAO.createDAO(MyDAO.java:99)
            ...
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 5
  • Red Hat JBoss Service Oriented Architecture Platform (SOAP) 5
  • Hibernate 3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content