[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2937) NullPointException during flush if getSnapshot return null
Thomas Hallgren (JIRA)
noreply at atlassian.com
Wed Nov 19 16:07:17 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31751#action_31751 ]
Thomas Hallgren commented on HHH-2937:
--------------------------------------
I tried the same code using JBoss 4.2.3 with Hibernate 3.3.1. Same issue but slightly different line numbers in the stack trace:
Caused by: java.lang.NullPointerException
at org.hibernate.collection.PersistentBag.equalsSnapshot(PersistentBag.java:103)
at org.hibernate.engine.CollectionEntry.dirty(CollectionEntry.java:172)
at org.hibernate.engine.CollectionEntry.preFlush(CollectionEntry.java:197)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareCollectionFlushes(AbstractFlushingEventListener.java:183)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:92)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:88)
> 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