users@jpa-spec.java.net
[jpa-spec users] Re: persistence.xml schemaLocation not right?
This message
: [
Message body
] [ More options (
top
,
bottom
) ]
Related messages
: [
Next message
] [
Previous message
] [
In reply to
] [
Next in thread
] [
Replies
]
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]
From
: guy pelletier <
guy.pelletier_at_oracle.com
>
Date
: Tue, 29 Oct 2013 11:19:48 -0400
Hi Laird,
Try this:
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/orm
orm_2_0.xsd"
replace the last "/" with a space.
Cheers,
Guy
On 29/10/2013 11:09 AM, Laird Nelson wrote:
> The persistence.xml schema has the following towards the top of the file:
>
> <xsd:documentation><![CDATA[
>
> This is the XML Schema for the persistence object/relational
> mapping file.
> The file may be named "META-INF/orm.xml" in the persistence
> archive or it may be named some other name which would be
> used to locate the file as resource on the classpath.
>
> Object/relational mapping files must indicate the object/relational
> mapping file schema by using the persistence namespace:
>
>
http://java.sun.com/xml/ns/persistence
>
> and indicate the version of the schema by
> using the version element as shown below:
>
> <entity-mappings xmlns="
http://java.sun.com/xml/ns/persistence/orm
"
> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
"
> xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/orm
> *
http://java.sun.com/xml/ns/persistence/orm/orm_2_0.xsd
*"
> version="2.0">
> ...
> </entity-mappings>
>
>
> ]]></xsd:documentation>
>
> Note the value of the xsi:schemaLocation attribute in this example,
> specifically the URL designating the actual location:
>
> xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/orm
>
http://java.sun.com/xml/ns/persistence/*orm/*orm_2_0.xsd
"
>
> That URL,
http://java.sun.com/xml/ns/persistence/orm/orm_2_0.xsd
, does
> not resolve.
>
> But removing the last orm/element does make it resolve.
>
> What is the proper schemaLocationto use?
>
> Thanks,
> Laird
>
> --
>
http://about.me/lairdnelson
This message
: [
Message body
]
Next message
:
Laird Nelson: "[jpa-spec users] Re: persistence.xml schemaLocation not right?"
Previous message
:
Laird Nelson: "[jpa-spec users] persistence.xml schemaLocation not right?"
In reply to
:
Laird Nelson: "[jpa-spec users] persistence.xml schemaLocation not right?"
Next in thread
:
Laird Nelson: "[jpa-spec users] Re: persistence.xml schemaLocation not right?"
Reply
:
Laird Nelson: "[jpa-spec users] Re: persistence.xml schemaLocation not right?"
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]