We're updating the issue view to help you get more done. 

ClassCastException on loaded entities under GlassFish 4.0

Description

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.

Environment

GlassFish 4.0, Windows 8. NetBeans 8.0.1

Status

Assignee

Steve Ebersole

Reporter

VadimsZ

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.3.6
4.3.8

Priority

Major