NPE in org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes

Description

The following line is causing a transient NPE while doing a simple select query:

`EntityEntry entry = (EntityEntry) me.getValue();`

We are using Hibernate 4.1.8.Final with Spring 3.1

StackTrace:

java.lang.NullPointerException
at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:148)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1240)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
...

Environment

Hibernate 4.1.8.Final / MySQL 5.1

Assignee

Unassigned

Reporter

HarishH

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure