[hibernate-issues] [Hibernate-JIRA] Updated: (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

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sat May 31 14:48:33 EDT 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard updated ANN-740:
---------------------------------

    Fix Version/s: 3.4.1

> 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
>             Fix For: 3.4.1
>
>
> 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