Open JPA error-Could not locate metadata for the class using alias

46 messages Options
Embed this post
Permalink
1 2 3
Patrick Linskey

RE: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink
> This is good to hear! (And also that the @MappedSuperclass
> was the right way to go). I'm today not working on this
> project, so I'll work through the changes tomorrow first thing!

Cool. FWIW, I think that either @MappedSuperclass or @Entity could work
as an approach; switching to @Entity just seemed like more work given
how things were set up.

-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:[hidden email]]
> Sent: Wednesday, April 25, 2007 2:31 AM
> To: [hidden email]
> Subject: RE: Open JPA error-Could not locate metadata for the
> class using alias
>
>
>
>
> Patrick Linskey wrote:
> >
> > So, I got things working
>
> This is good to hear! (And also that the @MappedSuperclass
> was the right way to go). I'm today not working on this
> project, so I'll work through the changes tomorrow first thing!
>
> --
> View this message in context:
> http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata
> -for-the-class-using-alias-tf3561516.html#a10177260
> 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.
tbee

RE: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink
In reply to this post by Patrick Linskey

Patrick Linskey wrote:
I think that if you do 1, 2, 3, 5, and 6, you should be in good shape.
This indeed seems to work!

BTW, Toplink just now also had its lazy loading issue solved: turns out @MappedSuperclass classes must be listed in the persistence.xml.  The solution actually was unexpected, it suddenly worked, after you told me to do add them for the OpenJPA issue. You've solved two issues in one go! :-)

So now I'm suddenly from no working library to two. Now to decide which one to use.

Many thanks Patrick!
Patrick Linskey

RE: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink
> Many thanks Patrick!

You're welcome.

FYI, once I commit a fix to OPENJPA-229, you'll be able to use the same
class names once again. Sorry about that bug.

-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:[hidden email]]
> Sent: Thursday, April 26, 2007 1:54 AM
> To: [hidden email]
> Subject: RE: Open JPA error-Could not locate metadata for the
> class using alias
>
>
>
>
> Patrick Linskey wrote:
> >
> > I think that if you do 1, 2, 3, 5, and 6, you should be in
> good shape.
> >
>
> This indeed seems to work!
>
> BTW, Toplink just now also had its lazy loading issue solved:
> turns out @MappedSuperclass classes must be listed in the
> persistence.xml.  The solution actually was unexpected, it
> suddenly worked, after you told me to do add them for the
> OpenJPA issue. You've solved two issues in one go! :-)
>
> So now I'm suddenly from no working library to two. Now to
> decide which one to use.
>
> Many thanks Patrick!
> --
> View this message in context:
> http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata
> -for-the-class-using-alias-tf3561516.html#a10196445
> 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.
tbee

RE: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink

Patrick Linskey wrote:
FYI, once I commit a fix to OPENJPA-229, you'll be able to use the same
class names once again. Sorry about that bug.
Understood. Right now I'm in the connection debate: toplink cannot use less than 2, so each of my fat clients will have 3 open (1 it already has). So the decision is still open. It appears that using a business model this way is not something that is done often.
Patrick Linskey

RE: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink
> Understood. Right now I'm in the connection debate: toplink
> cannot use less than 2, so each of my fat clients will have 3
> open (1 it already has). So the decision is still open. It
> appears that using a business model this way is not something
> that is done often.

In what sense? In my experience, it's quite common to have some JDBC
code and some JPA code in non-trivial applications; connection
integration between the two different environments certainly is not
uncommon.

Note that if you plan to be accessing the same data in both places
(which is a bit less common), you should take care to flush your EM when
going from JPA to JDBC, and take corresponding precautions after going
from JDBC back to JPA work.

As David pointed out, if you're using table-based sequences in OpenJPA,
then, depending on your connection retain mode and flushing
characteristics, OpenJPA may need a second connection from time to time.
If you ensure that sufficient sequence values are available before doing
something that forces an EM to hold onto a connection, then you can
avoid this.

-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:[hidden email]]
> Sent: Thursday, April 26, 2007 10:17 AM
> To: [hidden email]
> Subject: RE: Open JPA error-Could not locate metadata for the
> class using alias
>
>
>
>
> Patrick Linskey wrote:
> >
> > FYI, once I commit a fix to OPENJPA-229, you'll be able to use the
> > same class names once again. Sorry about that bug.
> >
>
> Understood. Right now I'm in the connection debate: toplink
> cannot use less than 2, so each of my fat clients will have 3
> open (1 it already has). So the decision is still open. It
> appears that using a business model this way is not something
> that is done often.
> --
> View this message in context:
> http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata
> -for-the-class-using-alias-tf3561516.html#a10204857
> 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.
Marina Vatkina

Re: Open JPA error-Could not locate metadata for the class using alias

Reply Threaded More More options
Print post
Permalink
In reply to this post by tbee
tbee wrote:

>
>
> Patrick Linskey wrote:
>
>>I think that if you do 1, 2, 3, 5, and 6, you should be in good shape.
>>
>
>
> This indeed seems to work!
>
> BTW, Toplink just now also had its lazy loading issue solved: turns out
> @MappedSuperclass classes must be listed in the persistence.xml.

@MappedSuperclass must be listed (though providers can choose to help you there,
the spec doesn't require them to do so) - see the spec section

6.2.1.6 mapping-file, jar-file, class, exclude-unlisted-classes

The following classes must be implicitly or explicitly denoted as managed
persistence classes to be included within a persistence unit: entity classes;
embeddable classes; mapped superclasses.

-marina

  The
> solution actually was unexpected, it suddenly worked, after you told me to
> do add them for the OpenJPA issue. You've solved two issues in one go! :-)
>
> So now I'm suddenly from no working library to two. Now to decide which one
> to use.
>
> Many thanks Patrick!
1 2 3