Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jar file for JPA 2.0

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;

I've created a JPA project where I try to user the above classes but I'm unable to find what jar I'm missing for them. Please guide me.

like image 264
user246160 Avatar asked Feb 11 '10 08:02

user246160


4 Answers

Try the Geronimo specs JPA2 jar http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.0-PFD2/ There is still no official JPA2.jar

like image 157
DataNucleus Avatar answered Nov 09 '22 20:11

DataNucleus


EclipseLink provides the JPA 2.0 Reference Implementation which is officially out since Java EE 6 is out. You'll find these classes in the jars bundled in eclipselink-2.0.0.v20091127-r5931.zip. If you are looking for a Maven repo, have a look at this page.

like image 43
Pascal Thivent Avatar answered Nov 09 '22 18:11

Pascal Thivent


A slightly better answer (since 2011) is to use the one from maven central, i.e.,

org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1-Final

OR

<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>

See: http://repo1.maven.org/maven2/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/

For all the available versions, especially the latest, see http://repo1.maven.org/maven2/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/

like image 5
ryenus Avatar answered Nov 09 '22 18:11

ryenus


Here is hibernate-jpa-2.0

http://repository.jboss.org/maven2/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/

like image 3
Bozho Avatar answered Nov 09 '22 19:11

Bozho