[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2937) NullPointException during flush if getSnapshot return null
Thomas Hallgren (JIRA)
noreply at atlassian.com
Wed Nov 19 13:24:16 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31747#action_31747 ]
Thomas Hallgren commented on HHH-2937:
--------------------------------------
I just got a NullPointerException in that method. I'm not sure what's causing it. The same named query has been issued several times before this happens. I'm using JBoss 4.2.3.
Caused by: java.lang.NullPointerException
at org.hibernate.collection.PersistentBag.equalsSnapshot(PersistentBag.java:80)
at org.hibernate.engine.CollectionEntry.dirty(CollectionEntry.java:149)
at org.hibernate.engine.CollectionEntry.preFlush(CollectionEntry.java:174)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareCollectionFlushes(AbstractFlushingEventListener.java:160)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:69)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:80)
> NullPointException during flush if getSnapshot return null
> ----------------------------------------------------------
>
> Key: HHH-2937
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2937
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.2
> Environment: Windows
> Reporter: Emilio Dolce
>
> The method equalsSnapshot of the PersistentBag class do not check if returned snapshot is null causing a NullPointException.
> Please che the next condition with this:
> if ( sn == null || sn.size()!=bag.size() ) return false;
--
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