hi!
which JPA API jar do you use?
I'm using
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<version>1.1</version>
</dependency>
which contains the needed method.
So you might have to exclude some transitive dependency [1] to a JPA-1 api jar
from your spring dependency.
Probably something like
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
</dependency>
?
LieGrue,
strub
[1]
http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
--- On Sun, 11/28/10, gkorland <[email protected]> wrote:
> From: gkorland <[email protected]>
> Subject: Error running on Spring 3
> To: [email protected]
> Date: Sunday, November 28, 2010, 3:55 PM
>
> I tried creating an EntityManagerFactory with Spring 3 but
> I keep getting the
> following error:
>
> Caused by: java.lang.NoSuchMethodError:
> javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
> at
> org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457)
> at
> org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:314)
>
> It seems like the issue is that this method was added in
> JPA 2.0 while the
> version supported by Spring is only OpenJPA 1.1.0 (which is
> I guess JPA 1.0
> compatible)
>
> I couldn't find on SpringSource repository newer version
> than 1.1.0.
> Any ideas?
>
> Thanks,
> Guy
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Error-running-on-Spring-3-tp5781867p5781867.html
> Sent from the OpenJPA Users mailing list archive at
> Nabble.com.
>