This issue is caused by the performance improvement done on 5.4.4 (and backported on 5.3.11).
the symptom is a NPE when flushing a persisted entity containing a ElementCollection with null as one of the elements in the list.
a test case has been attached
The NPE is also thrown when an automatic flush is triggered (when for example we call getResultList() on a native query).
upgrading to the latest 5.4.6 doesn't fix the issue not downgrading to 5.3.12 but downgrade to 5.4.3 fix the issue...
this is the interesting part of the stacktrace:
Caused by: java.lang.NullPointerException
test case attached
Also a blocker for my company upgrading to 5.4.6
thanks! The next maintence release will include your fix.
Fixed in 5.3 branch.