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. -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? >
