NullPointerException in StatefulPersistenceContext.clear

Description

In our application we use EntityManager.Clear in a method annotated with @transactional although we know it's not best practice ( we'll remove the call to clear()).

when performing the same operation in large scale (the operation is done on single element and not in a robust way), we get NullPointerException.
stack trace:

the stack trace show that the the source of the call is our call to entityManager.clear().

Environment

JPA 2.1
hibernate-commons-annotations 4.0.5
hibernate-core 4.3.8
postgres 9.4

Assignee

Unassigned

Reporter

Meytal Zuta

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Minor
Configure