openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTSI)" <dk0...@att.com>
Subject RE: Schema version problem upgrading to JPA 2.0
Date Thu, 20 May 2010 16:21:11 GMT
> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com]
> Sent: Thursday, May 20, 2010 3:39 AM
> To: users@openjpa.apache.org
> Subject: Re: Schema version problem upgrading to JPA 2.0
> 
> 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.

I appear to have some mess in my build script that is causing multiple
versions of jars to be deployed in the WAR file.  I'm still trying to
straighten that out.  I'm now having the following issue when I deploy
to WebLogic 10.3.3:

ClassCastException:
org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to
javax.persistence.spi.PersistenceProvider

I may have to retrace my steps all the way back to 1.2.2 to figure out
what's wrong here.

What is the significance of the "geronimo-jpa_3.0_spec-1.0.jar" in the
1.2.2 distribution, as opposed to "geronimo-jpa_2.0_spec-1.0.jar" in the
2.0.0 distribution?

> On Wed, May 19, 2010 at 9:24 PM, KARR, DAVID (ATTSI) <dk068x@att.com>
> 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'.
> >

Mime
View raw message