Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5540E4CC8 for ; Thu, 7 Jul 2011 21:27:39 +0000 (UTC) Received: (qmail 96814 invoked by uid 500); 7 Jul 2011 21:27:39 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 96681 invoked by uid 500); 7 Jul 2011 21:27:38 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 96673 invoked by uid 99); 7 Jul 2011 21:27:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 21:27:38 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=DOS_RCVD_IP_TWICE_B,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.41] (HELO mail-fx0-f41.google.com) (209.85.161.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 21:27:34 +0000 Received: by fxg9 with SMTP id 9so1680837fxg.0 for ; Thu, 07 Jul 2011 14:27:12 -0700 (PDT) Received: by 10.223.143.17 with SMTP id s17mr1906574fau.34.1310074031952; Thu, 07 Jul 2011 14:27:11 -0700 (PDT) Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by mx.google.com with ESMTPS id o23sm6951171faa.33.2011.07.07.14.27.10 (version=SSLv3 cipher=OTHER); Thu, 07 Jul 2011 14:27:11 -0700 (PDT) Received: by fxg9 with SMTP id 9so1680806fxg.0 for ; Thu, 07 Jul 2011 14:27:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.159.197 with SMTP id k5mr1899862fax.50.1310074029800; Thu, 07 Jul 2011 14:27:09 -0700 (PDT) Received: by 10.223.81.69 with HTTP; Thu, 7 Jul 2011 14:27:09 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Jul 2011 09:27:09 +1200 Message-ID: Subject: Re: Enhancement skipping field From: Matthew Goodson To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=0023541880442cfee804a78161b3 --0023541880442cfee804a78161b3 Content-Type: text/plain; charset=ISO-8859-1 Hi, Kevin: We're using maven and it is picking up the Phone_ class and generating the warning here's the link for the uuid class that we're using https://github.com/stephenc/eaio-uuid/blob/master/src/main/java/com/eaio/uuid/UUID.java And the persistence xml... org.apache.openjpa.persistence.PersistenceProviderImpl com.spidertracks.aviator.model.Persistable com.spidertracks.aviator.model.UuidEntity com.spidertracks.aviator.model.cluster.ClusterRegion com.spidertracks.aviator.model.cluster.SpiderRegion com.spidertracks.aviator.model.security.AviatorRememberMeToken com.spidertracks.aviator.model.sms.PhoneValidationMessage com.spidertracks.aviator.model.sms.ReceivedSmsMessage com.spidertracks.aviator.model.sms.SentSmsMessage com.spidertracks.aviator.model.sms.SmsMessage com.spidertracks.aviator.model.sms.SosClosedMessage com.spidertracks.aviator.model.sms.SosInvalidResponseMessage com.spidertracks.aviator.model.sms.SosMessage com.spidertracks.aviator.model.sms.SosTierOneMessage com.spidertracks.aviator.model.sms.SosTierOneReopenedUserMessage com.spidertracks.aviator.model.sms.SosTierTwoMessage com.spidertracks.aviator.model.sms.SosTierTwoReopenedUserMessage com.spidertracks.aviator.model.sms.SosTierTwoUserMessage com.spidertracks.aviator.model.sos.ContactedPerson com.spidertracks.aviator.model.sos.OpenHistory com.spidertracks.aviator.model.sos.SoS com.spidertracks.aviator.model.spider.Spider com.spidertracks.aviator.model.spider.message.AlertAcknowlege com.spidertracks.aviator.model.spider.message.ConfigMessageUpdate com.spidertracks.aviator.model.spider.message.DistanceSettings com.spidertracks.aviator.model.spider.message.MobileTerminatedConfirmation com.spidertracks.aviator.model.spider.message.SpiderUpdate com.spidertracks.aviator.model.spider.message.SpiderwatchSettings com.spidertracks.aviator.model.spider.message.TimeDistanceSettings com.spidertracks.aviator.model.spider.message.TimeSettings com.spidertracks.aviator.model.spider.message.WatchOff com.spidertracks.aviator.model.spider.message.WatchOn com.spidertracks.aviator.model.user.ContactLink com.spidertracks.aviator.model.user.Address com.spidertracks.aviator.model.user.Customer com.spidertracks.aviator.model.user.EmailConfirmationToken com.spidertracks.aviator.model.user.HashedUserToken com.spidertracks.aviator.model.user.InvitedPerson com.spidertracks.aviator.model.user.PasswordResetToken com.spidertracks.aviator.model.user.Person com.spidertracks.aviator.model.user.User com.spidertracks.aviator.model.user.Vehicle com.spidertracks.aviator.model.user.Phone On Fri, Jul 8, 2011 at 3:36 AM, Kevin Sutter wrote: > Why are we attempting to enhance a generated metamodel class? > > "class com.spidertracks.aviator.model.user.Phone_" > > Classes that end in an underscore were probably generated for the metamodel > and/or criteria API usage. So, something seems out of whack with > attempting > to enhance these classes. > > Kevin > > On Thu, Jul 7, 2011 at 7:53 AM, Rick Curtis wrote: > > > Can you post your UUID class and the contents of your persistence.xml? > > > > Thanks, > > Rick > > > > On Wed, Jul 6, 2011 at 11:09 PM, Matthew Goodson < > > matthew@spidertracks.co.nz > > > wrote: > > > > > Just adding the class for reference > > > > > > @Embeddable > > > //public class Phone extends EmbeddedUUID implements WebOptionString, > > > Serializable { > > > public class Phone implements WebOptionString, Serializable { > > > > > > private static final long serialVersionUID = 1L; > > > > > > @Persistent > > > private UUID id; > > > @Persistent > > > @NotEmpty(message = "{phone.number.required}") > > > @NumericString(message = "{phone.number.digitsonly}") > > > private String number; > > > > > > @Persistent > > > private String countryIdd; > > > > > > @Persistent > > > @NotNull(message = "{phone.country.required}") > > > private String iddCountryCode; > > > > > > @Persistent > > > @NotNull(message = "{phone.type.required}") > > > private PhoneType type; > > > > > > public Phone() { > > > id = new UUID(); > > > } > > > > > > public Phone(String number, Country country, PhoneType type) { > > > this(); > > > this.number = number; > > > this.type = type; > > > setIddCountry(country); > > > } > > > > > > public void setNumber(String number) { > > > this.number = number; > > > } > > > > > > public String getNumber() { > > > return number; > > > } > > > > > > public void setType(PhoneType type) { > > > this.type = type; > > > } > > > > > > public PhoneType getType() { > > > return type; > > > } > > > > > > @Override > > > public String getDisplayString() { > > > return number; > > > } > > > > > > public void setIddCountry(Country country) { > > > if (country != null) { > > > this.iddCountryCode = country.getCode(); > > > this.countryIdd = country.getIdd(); > > > } > > > } > > > > > > public Country getIddCountry() { > > > if (iddCountryCode != null) { > > > return CountryFactory.INSTANCE.getByCode(this.iddCountryCode); > > > } > > > return null; > > > } > > > > > > public String getIddCountryCode() { > > > return iddCountryCode; > > > } > > > > > > public String getFullNumber() { > > > return (countryIdd == null ? "" : countryIdd) + (number == null ? "" : > > > number); > > > } > > > public void clone(Phone other) { > > > Assert.notNull(other); > > > setIddCountry(other.getIddCountry()); > > > setNumber(other.getNumber()); > > > setType(other.getType()); > > > } > > > > > > public UUID getId() { > > > return id; > > > } > > > public void setId(UUID id) { > > > Assert.notNull(id); > > > this.id = id; > > > } > > > } > > > > > > > > > On Thu, Jul 7, 2011 at 3:36 PM, Matthew Goodson > > > wrote: > > > > > > > Hi guys. I have a problem with jpa enhancement. > > > > I am using version 2.1.0 and I am trying to get it to enhanced an > > object > > > > 'Phone' with a field 'id' which is of type com.eaio.UUID. However > when > > I > > > run > > > > the enhancement I get the 2 warnings below. > > > > Any ideas? > > > > > > > > 411 openjpa WARN [main] openjpa.MetaData - Field " > > > > com.spidertracks.aviator.model.user.Phone.id" is not a type that is > > > > persistent by default. If you want this field to be persistent, you > > have > > > to > > > > explicitly set it to persistent in your metadata. > > > > > > > > 681 openjpa WARN [main] openjpa.Enhance - Type "class > > > > com.spidertracks.aviator.model.user.Phone_" loaded by > > > > java.net.URLClassLoader@69dfe453 has no metadata; enhancing as > > > persistence > > > > aware. If you intended for "class > > > > com.spidertracks.aviator.model.user.Phone_" to be > persistence-capable, > > > then > > > > this means that OpenJPA could not find any metadata for "class > > > > com.spidertracks.aviator.model.user.Phone_". 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. > > > > > > > > > > > > > > > -- > > *Rick Curtis* > > > -- Matthew Software Engineer Matthew Goodson | spidertracks po box 5203 | 117a the square | Palmerston North 4441 | new zealand P: +64 6 353 3395 | M: +64 27 6969639 E: *matthew@spidertracks.co.nz* * www.spidertracks.com* spiderwatch - because in the rescue game, time = life. --0023541880442cfee804a78161b3--