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:
"nl.reinders.bm.generated.License.iLicensenr" 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.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
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. 

> -----Original Message-----
> From: tbee [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 25, 2007 12:03 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: RE: Open JPA error-Could not locate metadata for the 
> class using alias
> 
> 
> 
> 
> Patrick Linskey wrote:
> > 
> > I don't think that uploading to this mailing list works; 
> the easiest 
> > thing to do is to create a JIRA issue and attach the jar / 
> zip of the 
> > problem there. If you'd rather not create a JIRA account, 
> you can send 
> > the code to pcl at apache dot org, and I'll attach it to a 
> new issue 
> > for the group's perusal.
> > 
> 
> Alrighty then: OPENJPA-228
> 
> This is the BM archive with "@Entity extends @Entity" instead 
> of "@Entity extends @MappedSuperclass". But I do not believe 
> OpenJPA gets to that part, because that actually does not 
> make a difference.
> 
> --
> View this message in context: 
> http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata
> -for-the-class-using-alias-tf3561516.html#a10175457
> Sent from the open-jpa-dev mailing list archive at Nabble.com.
> 
> 

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.

Reply via email to