openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Fri, 20 Apr 2007 11:52:25 GMT
On 4/20/07, tbee <tbee@tbee.org> wrote:
>
> I'm having the same exception. Strange is that the IDENTICAL codebase runs
> without errors under Toplink JPA. I've only changed the provider and
> properties in the persistence.xml and included the OpenJPA jars to the
> project. (That is what JPA should be able to do, afterall.)

If a JPA provider runs in Java SE environments, persistence.xml file
should list all the available persistence classes using <class> to
insure portability.

The spec reads (6.2.1.6 mapping-file, jar-file, class,
exclude-unlisted-classes page 138):

"The class element is used to list a managed persistence class. A list
of all named managed persistence classes must be specified in Java SE
environments to insure portability. Portable Java SE applications
should not rely on the other mechanisms
described here to specify the managed persistence classes of a
persistence unit. Persistence providers may also require that the set
of entity classes and classes that are to be managed must be fully
enumerated in each of the persistence.xml files in Java SE
environments."

So I read it that you're relying "on the other mechanisms" TopLink JPA provides.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message