There is a problem with 4.3.6 under GlassFish Server Open Source Edition 4.0 (build 89): a simple call of TestClass t = getEntityManager().find(TestClass.class, id); results in a ClassCastException error. The same project with 4.3.5 and 4.3.2 works fine. I specifically did a small test project which loads all artifacts into WEB-INF/lib, and I removed all libraries from the GlassFish's lib directory. The problems seems in class loaders. The class loader of the class of object from the left is different than the class loader of TestClass.class. This bug also affect the newest OGM, since it depends on 4.3.6 version.
|