Including the schema location to the 2.0 persistence XSD should work and may
be necessary using Spring, since, like JEE containers, it may parse the
persistence.xml and expect the schemaLocation to be present for validation
purposes. But, I haven't used Spring either so I can say for certain.
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" >
...
</persistence>
-Jeremy
On Thu, Mar 11, 2010 at 2:50 PM, Donald Woods <[email protected]> wrote:
> By the JPA schema version specified in the persistence.xml -
>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> version="2.0">
>
> The above is used in out junits to test the Bean Validation supprt which
> is JPA 2.0 specific.
>
> Not sure if using the reference to the 2_0.xsd works.....
>
>
> -Donald
>
>
> On 3/11/10 3:40 PM, Pmoran wrote:
> >
> > That has not helped. let me get back to an earlier question, how does
> OPENJPA
> > determine a given project is version 1.0 versus 2.0?
> > My project does the following:
> > Set openjpa.specification=jpa 2.0
> > persistence.xml is version 2.0
> > no orm.xml
> > only openJPA-2.0.0beta2.jar on path
> > Eclipse (STS version) IDE, maven pom based build
> >
> > What am i missing?
>