So, if I understand you correctly, everything is fine when using Hibernate proper i.e. your test case works as expected? But with Hibernate inside GlassFish, you have the aforementioned error? If so I suspect GlassFish is doing something wrong. Could you create a minimal war project (preferably a Maven one) with only the necessary things to reproduce the issue on a recent GlassFish 5? I'll take a look at what is happening. Even if I don't find anything, it might be useful in the end to open a bug in the GlassFish bugtracker. Thanks! |