openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbee <>
Subject RE: Open JPA error-Could not locate metadata for the class using alias
Date Wed, 25 Apr 2007 08:05:30 GMT

Patrick Linskey wrote:
> Ok... the problem is that OpenJPA requires that you run the OpenJPA
> class enhancer over your classes (or run in a container environment such
> as an appserver or Spring, which can do class-load-time processing).
> The other problem is that the error message is really bad, in that it
> doesn't suggest that as a cause, and in that the message stringification
> is deferred, causing the "Article=null" negative-cache misdirection.
> I've changed the error message and toString() logic.
> Meanwhile, I got the following when running the enhancer on your
> classes:
> <0.0.0 fatal user error> org.apache.openjpa.util.MetaDataException:
> "" declares generator name
> "licensenr", but uses the AUTO generation type.  The only valid
> generator names under AUTO are "uuid-hex" and "uuid-string". 
> I changed the @GeneratedValue annotation to specify that it's using the
> 'GenerationType.TABLE' strategy, but then I ran into problems with
> classes that had compound identity but didn't specify an @IdClass.

Ok, the first part I get; actually very logical. 

The generator I follow also, I should alter the RevEng to generate
type=table. Ok. But the compound identity I'm not quite following. If all is
well then I should be generating "*" classes for tables with more
than one field in the PK and the corresponding @IdClass. Maybe the quick
change to "@Entity extends @Entity" has a bug, now that I think of it, the
@IdClass may refer to a PK class that actually is in the generated package.
Could you elaborate?

View this message in context:
Sent from the open-jpa-dev mailing list archive at

View raw message