Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 54950 invoked from network); 20 May 2010 10:39:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 10:39:28 -0000 Received: (qmail 85537 invoked by uid 500); 20 May 2010 10:39:27 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 85474 invoked by uid 500); 20 May 2010 10:39:26 -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 85461 invoked by uid 99); 20 May 2010 10:39:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 10:39:26 +0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.161.46 as permitted sender) Received: from [209.85.161.46] (HELO mail-fx0-f46.google.com) (209.85.161.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 10:39:21 +0000 Received: by fxm10 with SMTP id 10so3555425fxm.33 for ; Thu, 20 May 2010 03:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=u3vBitsUvVp0tVJ93QlnBkkZpmzvUhfIVpRKpfhZ3Pg=; b=xZBmOcPjFtnUw/UMRcMmzn1JAZPefcB8ytVjZR0ZyNq/C+F8j41E5tQfgW/n8T0qYB qjVfCLB9POFNYKMCjMJoAlXNStPA5X3+Vm78vInAs2IR8wWiY+k+hV6UNmaZmVvR4WoZ qYjHcSOskVIilmGXpoc8TTBAw8GSnA1s1D0/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=wBydE9vr2Hy3JWQVmTn1WPwLWsW0BEQfaxRN6Z2aTaJHhXypFJCZ0fC5o1LXjP0qwI UjOZsSN3SItOu/XiXM25GBzMk9UJ2yLBZUCoqAtmkJyiNNDovnQn1CG35YE3MBAzvbJf Z/caZ6HLzP6J8vaC4HzlWNlL+GjX00DVM7TCU= Received: by 10.103.81.12 with SMTP id i12mr6926261mul.89.1274351936213; Thu, 20 May 2010 03:38:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.116.76 with HTTP; Thu, 20 May 2010 03:38:36 -0700 (PDT) In-Reply-To: References: From: Michael Dick Date: Thu, 20 May 2010 05:38:36 -0500 Message-ID: Subject: Re: Schema version problem upgrading to JPA 2.0 To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=0016e6482b447a16880487042e38 --0016e6482b447a16880487042e38 Content-Type: text/plain; charset=ISO-8859-1 Going back a couple of emails - the namespace is right - it's that way in the JPA spec. Are you just compiling your entities, or is one of the OpenJPA ant tasks causing the error? If it's just compiling I'd guess it's the meta-model generator which is parsing orm.xml. The problem might not be in meta-model generation - but you might be able to work around it by specifying -proc:none as a compiler argument. Regards, -mike On Wed, May 19, 2010 at 9:24 PM, KARR, DAVID (ATTSI) wrote: > > -----Original Message----- > > From: KARR, DAVID (ATTSI) > > Sent: Wednesday, May 19, 2010 7:08 PM > > To: users@openjpa.apache.org > > Subject: RE: Schema version problem upgrading to JPA 2.0 > > > > > -----Original Message----- > > > From: KARR, DAVID (ATTSI) > > > Sent: Wednesday, May 19, 2010 6:31 PM > > > To: users@openjpa.apache.org > > > Subject: Schema version problem upgrading to JPA 2.0 > > > > > > I think I noticed some talk about this before, but I can't find it > in > > > the archives now. > > > > > > I tried to upgrade to version 2.0.0 today. The upgrade with no > > changes > > > worked fine. Now I'm trying to modify it to use the small number of > > > 2.0 > > > features that I'm attempting to use. > > > > > > When I changed the "schemaLocation" attribute to point to the 2.0 > xsd > > > (I'm really surprised the namespace didn't change), then Eclipse > > > complained that I had to change the "version" attribute also, which > I > > > did (to 2.0). I then added several "order-column" elements where I > > was > > > previously using the OpenJPA OrderColumn annotation. When I > > attempted > > > to build this, I got schema validation errors, claiming that there > > was > > > no "order-column" element (even though Eclipse validates this). If > I > > > temporarily changed the "version" attribute value back to "1.0", > then > > I > > > could get through that part of the build, even though Eclipse is now > > > complaining. I haven't attempted to run the app in this state. > > > > > > What am I missing? > > > > I noticed that in the openjpa jar file, there are two schema files, > > "orm-xsd.rsrc" and "orm_2_0-xsd.rsrc". The first is the 1.x schema, > > and > > the second is clearly the 2.x schema. I'm really wondering more about > > the fact that the namespace is the same between them. That can't be > > right. I wonder what would happen if I removed the 1.x schema from > the > > jar file? > > I tried renaming the 1.x schema file in the jar, adding ".save" to the > name to hide it. That gets me past the build/enhancement. I deployed > the app, then ran a request. That failed with the following: > > Caused by: org.xml.sax.SAXException: zip:.../orm.xml [Location: Line: 5, > C: 19]: org.xml.sax.SAXParseException: cvc-complex-type.3.1: Value '2.0' > of attribute 'version' of element 'entity-mappings' is not valid with > respect to the corresponding attribute use. Attribute 'version' has a > fixed value of '1.0'. > --0016e6482b447a16880487042e38--