-
Bug
-
Resolution: Done
-
Major
-
jboss-fuse-6.1
-
%
-
-
-
6.3 Sprint 4 (Mar 28 - Apr 29)
Using Fuse 6.1 which ships Hibernate 4.2.9.Final, there is an issue with certain bundle refreshes and deployments that manifests in 2 ways.
CCE on finds
Caused by: java.lang.ClassCastException: org.mrobson.example.minihibernate.datamodel.Person cannot be cast to org.mrobson.example.minihibernate.datamodel.Person
PropertyAccessException on merges
Cause: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.mrobson.example.minihibernate.datamodel.Person.id Error: IllegalArgumentException: Can not set int field org.mrobson.example.minihibernate.datamodel.Person.id to org.mrobson.example.minihibernate.datamodel.Person
Attached are 3 screenshots from the heapdump.
person_bundleCL_osgiCL_CCE.png shows the Person class from BundleClassLoader 0xe1ce0250 mapped to the Hibernate OsgiClassLoader.
Drilling down on the OsgiClassLoader, it's referencing the old BundleClassLoader which has an out of date reference to a Person class object that no longer maps to the datamodel bundles ClassLoader.
person_bundleREV_bundleCL_CCE.png shows my datamodel bundle with it's Person class in BundleClassLoader 0xe22d9420 thus putting the parent and sub enhanced class within different classloaders as well as being incorrectly mapped to the OsgiClassLoader.
person_bundleREV_buncleCL_Working.png shows restarting again to bring things into a working state.
OsgiClassLoader references BundleClassLoader 0xf7c89828 which maps to both Person from datamodel and the enhanced Person class.
It looks like in this case Hibernate is not re-creating the OSGI classloader mappings with updated references when certain combinations of bundle restarts or deployments happen with the bundle containing the entity classes. From there, it's references end up out of date.
- duplicates
-
ENTESB-4447 Incompatible TypedQuery exception is thrown when application(Using JPA-Hibernate) bundle is refreshed/re-installed
- Closed
- relates to
-
ENTESB-3599 JPA Hibernate application does not perform operation after undeploy/deploy of bundles, only re-installing feature 'hibernate' make operations possible.
- Closed