users@glassfish.java.net

Re: Persistence.xml - Convert from JPA 1.0 to 2.0

From: <glassfish_at_javadesktop.org>
Date: Fri, 26 Feb 2010 00:00:27 PST

This link:
http://en.wikibooks.org/wiki/Java_Persistence/Runtime#Example_JPA_2.0_persistence.xml_file

shows:
<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 persistence_2_0.xsd"
                version="2.0">

but I would fully qualify it as you thought. Note that you had [i]version="1.0"[/i], but it needs to be [b]2.0[/b]:
<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">

Note that the link you gave to the schema worked for me.

Best,
Ari
[Message sent by forum member 'arimeyer' (ari.meyer_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=388862