Fail fast when a pojo is marked with @org.hibernate.annotations.Entity instead of
@javax.persistence.Entity and is <class> in persistence.xml
---------------------------------------------------------------------------------------------------------------------------------------------
Key: ANN-740
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-740
Project: Hibernate Annotations
Issue Type: Improvement
Components: binder
Affects Versions: 3.3.1.GA
Reporter: Geoffrey De Smet
Priority: Minor
When a pojo is annotatedwith @org.hibernate.annotations.Entity, but not with
@javax.persistence.Entity
and it's in the persistence.xml as such:
<class>me.MyPojo</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
it shouldn't quietly ignore that MyPojo class, but instead fail fast with an exception
"Class me.MyPojo is defined in persistence.xml but isn't an
@javax.persistence.Entity".
I just started with Seam and JBoss AS and I made that mistake and it took me a couple of
days to track this down (I know, it looks so simple and so obvious)... because I always
figured JBoss classloading was to blame (while it wasn't). It's actually one of
the reasons I threw JBoss AS out and started using Jetty and Tomcat (which is working fine
now).
--
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