james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject Re: Mailbox-Jpa
Date Wed, 05 Oct 2011 13:11:54 GMT
On 10/05/2011 02:36 PM, Eric Charles wrote:
> Hi Felix,
>
> Are you referring to
> http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_meta.html#jpa_overview_meta_embeddable
> ?

Yes. In this sample the class is annotated as @Entity whereas we do have 
an abstract class -> @MappedSuperclass. Maybe it @MappedSuperclass would 
also work. Or the plugin gives a false positive, see below.

>
> http://openjpa.apache.org/embeddable-samples.html
>
>  From the second link, it seems that an extra table is created (not sure).

That's what I understood as well.

>
> Did you try to run with @Embeddable and look at the impact on database
> tables?

No. I'm still trying to get a created schema by the openjpa plugin


I was pointed to it by maven build output:

145  WARN   [main] openjpa.Enhance - Type "class 
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage$MailboxIdUidKey" 
loaded by java.net.URLClassLoader@6a37ea3c has no metadata; enhancing as 
persistence aware. If you intended for "class 
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage$MailboxIdUidKey" 
to be persistence-capable, then this means that OpenJPA could not find 
any metadata for "class 
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage$MailboxIdUidKey". 
This can happen if the directory containing your metadata is not in your 
CLASSPATH, or if your metadata files are not named properly. See the 
documentation on metadata placement for more information.

Regards
Felix

>
> Thx
>
> Eric
>
>
> On 05/10/11 14:03, Norman Maurer wrote:
>> Hi there,
>>
>> I'm not sure either.. Maybe someone else can confirm ?
>>
>> Bye,
>> Norman
>>
>>
>> 2011/10/5 Felix Knecht<felixk@apache.org>:
>>> @Norman
>>>
>>> Hi Norman
>>>
>>> I think the MailboxIdUidKey should be embeddable but I'm not absolutely
>>> sure. Can you please verify this?
>>>
>>> Thanks and regards
>>> Felix
>>>
>>> ### Eclipse Workspace Patch 1.0
>>> #P apache-james-mailbox-jpa
>>> Index:
>>> src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
>>>
>>> ===================================================================
>>> ---
>>> src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
>>>
>>> (revision 1178736)
>>> +++
>>> src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
>>>
>>> (working copy)
>>> @@ -27,6 +27,7 @@
>>> import javax.persistence.Basic;
>>> import javax.persistence.CascadeType;
>>> import javax.persistence.Column;
>>> +import javax.persistence.Embeddable;
>>> import javax.persistence.FetchType;
>>> import javax.persistence.Id;
>>> import javax.persistence.IdClass;
>>> @@ -105,6 +106,7 @@
>>> private static final String TOSTRING_SEPARATOR = " ";
>>>
>>> /** Identifies composite key */
>>> + @Embeddable
>>> public static class MailboxIdUidKey implements Serializable {
>>>
>>> private static final long serialVersionUID = 7847632032426660997L;
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message