openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: Dumb User Question
Date Mon, 06 Nov 2006 21:45:28 GMT
Tim-

Why are you using the orm xmlns? Rather than:

> <persistence xmlns="http://java.sun.com/xml/ns/persistence/orm">

I think you need to have:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"  
version="1.0">

Try that and let us know if you still get the same error.



On Nov 6, 2006, at 1:34 PM, Tim Holloway wrote:

> Abe White wrote:
>> The error message is from the XML parser; we don't have much  
>> control over it.  How about posting your persistence.xml?
>> _____________________________________________________________________ 
>> __
>> Notice:  This email message, together with any attachments, may  
>> contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
>> affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted   
>> and/or
>> legally privileged, and is intended solely for the use of the  
>> individual
>> or entity named in this message. If you are not the intended  
>> recipient,
>> and have received this message in error, please immediately return  
>> this
>> by email and then delete it.
> If it looks familiar, it's because for starters I just copied the  
> sample. Once get something parseable, then I'll adapt it.
>
> I looked over the openjpa sources, and it appears that the XML is  
> being handled in nonvalidating mode. I think that attaching the DTD  
> might help. A custom entity resolver allows you to embed the DTD  
> into the JAR instead of making the dreaded trip to the Internet.
>
> I don't claim the be the all-master of Java XML parsing, but I've  
> gotten more than my share of practice in it lately, if I can be of  
> assistance.
>
> <?xml version="1.0"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence/orm">
>  <persistence-unit name="openjpa">
>     
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</ 
> provider>
>    <class>tutorial.Animal</class>
>    <class>tutorial.Dog</class>
>    <class>tutorial.Rabbit</class>
>    <class>tutorial.Snake</class>
>    <properties>
>      <property name="openjpa.ConnectionURL"  
> value="jdbc:hsqldb:tutorial_database"/>
>      <property name="openjpa.ConnectionDriverName"  
> value="org.hsqldb.jdbcDriver"/>
>      <property name="openjpa.ConnectionUserName" value="sa"/>
>      <property name="openjpa.ConnectionPassword" value=""/>
>      <property name="openjpa.Log" value="DefaultLevel=WARN,  
> Tool=INFO"/>
>    </properties>
>  </persistence-unit>
> </persistence>
>


Mime
View raw message