[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-712?page=co...
]
Geoffrey De Smet commented on ANN-712:
--------------------------------------
Fair enough :)
Maybe a comment in the hibernate-annotations's pom and hibernate-entitymanager's
pom might make it clear for other users as well:
<!-- java.net's javax.persistence:persistence-api is not always up to date -->
Maven pom.xml should (in time) depend on
javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence
--------------------------------------------------------------------------------------------------------------------
Key: ANN-712
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-712
Project: Hibernate Annotations
Issue Type: Task
Affects Versions: 3.3.1.GA
Reporter: Geoffrey De Smet
Priority: Minor
Now it's possible to get the same classes (for example javax.persistence.Entity)
twice in the classpath:
- one from persistence-api-1.0.jar
- and another from ejb3-persistence-1.0.1.GA.jar.
Mix that with classloaders and you get bugs like A extends B but an A is not instance of
B (because B.class is loaded twice from different jars). Otherwise you can get this too,
but if the groupId:artifactId match, maven deals with it.
In theory, replace:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.1.GA</version>
</dependency>
with:
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version> <!-- FIXME -->
</dependency>
It looks like org.hibernate:ejb3-persistence is just a copy of
javax.persistence:persistence-api, but with a hot-fix applied to it:
probably because javax.persistence:persistence-api:1.0.1 isn't deployed to the
central repo yet.
So the JCP might need to be poked to put javax.persistence:persistence-api:1.0.1 on the
central repo :) Which is probably not an easy thing to do...
--
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