Hi,

What happens if you list your persistent types in the persistence.xml
file? OpenJPA has directory-scanning capabilities, but let's start
simple and just list them out.

(FWIW, the JPA spec says that when using JPA outside a container,
classes must be listed.)

-Patrick

On 9/16/07, Ballist1c <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> I have just shifted to OpenJPA and with a bit of fiddling around I have just
> managed to get it compiling and make it to runtime, atleast briefly :)
>
> I am quickly greeted with the error message of
>
> Could not locate metadata for the class using alias "Country". This could
> mean that the OpenJPA enhancer or load-time weaver was not run on the type
> whose alias is "Country". Registered alias mappings: "{Country=null}"
> <openjpa-1.0.0-r420667:568756 fatal user error>
> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata
> for the class using alias "Country". This could mean that the OpenJPA
> enhancer or load-time weaver was not run on the type whose alias is
> "Country". Registered alias mappings: "{Country=null}"
>
>
> The catch is with toplink libraries, it works fine.... so far my setup has
> been pretty straight forward with all the openJPA libraries added AND the
> persistence library configured to the following...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0" 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_1_0.xsd";>
>   <persistence-unit name="FFWebPU" transaction-type="RESOURCE_LOCAL">
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>     <exclude-unlisted-classes>false</exclude-unlisted-classes>
>     <properties>
>       <property name="openjpa.ConnectionUserName" value="FFWEB"/>
>       <property name="openjpa.ConnectionPassword" value=""/>
>       <property name="openjpa.ConnectionURL"
> value="jdbc:oracle:thin:@oratest:1521:TEST"/>
>       <property name="openjpa.ConnectionDriverName"
> value="oracle.jdbc.driver.OracleDriver"/>
>     </properties>
>   </persistence-unit>
> </persistence>
>
> --
> View this message in context: 
> http://www.nabble.com/Sick-of-Toplink%2C-Moving-too-OpenJPA-tf4464635.html#a12730067
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>


-- 
Patrick Linskey
202 669 5907

Reply via email to