[hibernate-issues] [Hibernate-JIRA] Created: (ANN-740) Fail fast when a pojo is marked with @org.hibernate.annotations.Entity instead of @javax.persistence.Entity and is <class> in persistence.xml
Geoffrey De Smet (JIRA)
noreply at atlassian.com
Sat May 17 07:44:33 EDT 2008
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list