I'm getting a NullPointerException from inside the MessageHelper class. I can cause this exception to be thrown every time using the website I'm developing on, but have been unable to create an isolated test case. To make things worse, when I debug, depending on what breakpoints I stop on and for how long, the NPE may or may not be thrown. I've been able to establish that the NPE is thrown when session.getPersistenceContext().getEntry(collection.getOwner()) returns null.
The top of the stack trace is:
Oracle 11.2, Spring 4.1.6