[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2011) NullPointer Exception in EntityEntry class probably due to the session closing in between the transaction of a FlushEventListener

Vinay Kumar Kandula (JIRA) noreply at atlassian.com
Thu Aug 17 06:11:18 EDT 2006


NullPointer Exception in EntityEntry class probably due to the session closing in between the transaction of a FlushEventListener
---------------------------------------------------------------------------------------------------------------------------------

         Key: HHH-2011
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2011
     Project: Hibernate3
        Type: Bug

 Environment: Hibernate 3 and MySQL
    Reporter: Vinay Kumar Kandula
 Attachments: AuditLogListener.java

The function onFlush which i created calls for AuditLogging i.e. whenever a save is clicked this function checks with the previous values and enters in the oldvalue to database if there is any change. At some time it is giving NullPointerException at 

Object oldValue = entityEntry.getLoadedValue(property);

entityEntry is not null at this position which is checked by debugging...the problem is in the getLoadedValue function ...problem is in the line below..
int propertyIndex = ( (UniqueKeyLoadable) persister ).getPropertyIndex(propertyName);

i am attaching the function..
I used openSessioninViewFilter too...wrapped the function using spring transaction....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list