[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-204?page=co...
]
Gail Badner updated EJB-204:
----------------------------
Comment: was deleted
ClassCastException when using <mapped-superclass> in orm.xml
------------------------------------------------------------
Key: EJB-204
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-204
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.2.0.cr1
Environment: Hibernate 3.2.0 cr2, EntityManager 3.2.0 cr1 and Annotations 3.2.0
cr1
Reporter: Levi Purvis
Priority: Minor
Fix For: 3.2.0.cr2
Using a <mapped-superclass> element in orm.xml will generate the following
exception:
javax.persistence.PersistenceException: java.lang.ClassCastException: $Proxy0
at
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
......
Caused by: java.lang.ClassCastException: $Proxy0
at
org.hibernate.reflection.java.EJB3OverridenAnnotationReader.getMappedSuperclass(EJB3OverridenAnnotationReader.java:1688)
at
org.hibernate.reflection.java.EJB3OverridenAnnotationReader.initAnnotations(EJB3OverridenAnnotationReader.java:285)
at
org.hibernate.reflection.java.EJB3OverridenAnnotationReader.isAnnotationPresent(EJB3OverridenAnnotationReader.java:257)
at
org.hibernate.reflection.java.JavaXAnnotatedElement.isAnnotationPresent(JavaXAnnotatedElement.java:40)
at
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:237)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
at
org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
at
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
... 19 more
Also see the following thread:
http://forum.hibernate.org/viewtopic.php?t=960744
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira