> -----Original Message-----
> From: Jeremy Bauer [mailto:[email protected]]
> Sent: Thursday, May 20, 2010 10:20 AM
> To: [email protected]
> Subject: Re: Schema version problem upgrading to JPA 2.0
> 
> Hi David,
> 
> Based on the version and schemaLocation attributes (primarily
version),
> OpenJPA should provide the proper rsrc file to the XML parser so that
> it can
> validate the orm using the correct version of the schema.  (ie.
> version="1.0" - orm-xsd.rsrc ; version="2.0" - orm_2_0-xsd.rsrc)  The
> specification uses the same namespace for both versions so that you
can
> move
> from one version to the next with minimal changes.
> 
> If you are still experiencing this problem can you provide a stripped
> down
> version of your war or ear file?  I don't have WebLogic, but given a
> template, I could try to reproduce the issue on another app server.

My problem is down to a conflict with the OpenJPA implementation in
WebLogic.  I can use OpenJPA 1.2.2 in WebLogic 10.3.x, but not 2.0.0.
This is because I'm attempting to use a different SPI version than what
is used inside WebLogic.  Solving this isn't as simple as just fixing
the classpath.  I can tell WebLogic to "prefer" my application packages,
but this creates other problems.

I posted a note about this with the WebLogic-specific details (some of
them, at least) at
<http://forums.oracle.com/forums/thread.jspa?threadID=1075480&tstart=0>.
I've also created an Oracle support ticket.  Perhaps they can help.

> 
> -Jeremy
> 
> On Wed, May 19, 2010 at 9:08 PM, KARR, DAVID (ATTSI) <[email protected]>
> wrote:
> 
> > > -----Original Message-----
> > > From: KARR, DAVID (ATTSI)
> > > Sent: Wednesday, May 19, 2010 6:31 PM
> > > To: [email protected]
> > > 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?
> >

Reply via email to