openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbee <t...@tbee.org>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Wed, 25 Apr 2007 06:03:02 GMT



Marina Vatkina wrote:
> 
> Do you have an orm.xml (or another <mapping>.xml file) that might override
> some 
> information? Can it be that not all classes are on the classpath? Or can
> there 
> be another persistence.xml or orm.xml on the classpath that can affect the 
> results? As there are plenty of tests that test an entity that extend an 
> abstract entity, it's most probably something in your configuration that
> causes 
> the problem.
> 
> BTW, what kind of error do you get with Toplink?
> 

The reverse engineering has always generated JPA classes, so there is no
other type of persistence configuration file aside from the one
persistence.xml file. In there I swap the "provider" tag in order to enable
Toplink or OpenJPA. The properties section contains properties for both
engines. 

Toplink requires a primary key to be present in the @Entity class:

Entity class [class nl.reinders.bm.Relationcat] has no primary key
specified. It should define either an @Id, @EmbeddedId or an @IdClass.

One this the Toplink reported was very interesting in association with the
OpenJPA problem:

The alias name for the entity class [class nl.reinders.bm.Relationcat] is
being defaulted to: Relationcat.

Toplink decides to default an alias. The OpenJPA error is something about
not being able to find a alias. What is it with this alias and do I need to
specify it somewhere?
-- 
View this message in context: http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata-for-the-class-using-alias-tf3561516.html#a10174890
Sent from the open-jpa-dev mailing list archive at Nabble.com.


Mime
View raw message