From dev-return-20281-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Mar 9 01:12:07 2012 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9322F9BE5 for ; Fri, 9 Mar 2012 01:12:07 +0000 (UTC) Received: (qmail 5744 invoked by uid 500); 9 Mar 2012 01:12:07 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 5570 invoked by uid 500); 9 Mar 2012 01:12:07 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 5537 invoked by uid 99); 9 Mar 2012 01:12:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2012 01:12:05 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Steve.Cameron@aad.gov.au designates 147.66.131.20 as permitted sender) Received: from [147.66.131.20] (HELO mail1.aad.gov.au) (147.66.131.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2012 01:11:56 +0000 Received: from its-exhts1.AAD.GOV.AU (Not Verified[147.66.8.7]) by mail1.aad.gov.au with MailMarshal (v6,7,2,8378) id ; Fri, 09 Mar 2012 12:20:37 +1100 Received: from EX2K7-CCR.AAD.GOV.AU ([147.66.8.4]) by its-exhts1.AAD.GOV.AU ([147.66.8.7]) with mapi; Fri, 9 Mar 2012 12:11:32 +1100 From: Steve Cameron To: "dev@openjpa.apache.org" Date: Fri, 9 Mar 2012 12:11:30 +1100 Subject: RE: more details on SQL Server reverse mapping problem[SEC=UNCLASSIFIED] Thread-Topic: more details on SQL Server reverse mapping problem[SEC=UNCLASSIFIED] Thread-Index: Acz9IMvEwai/q9/1TiKwgCKGhFG7VAAb/9og Message-ID: <410C0E47580EB147811BB64E83936A3F3EE5210166@EX2K7-CCR.AAD.GOV.AU> References: <~B4f589de10000.4f5924240000.0001.mml.600300484@EX2K7-CCR.AAD.GOV.AU> In-Reply-To: <~B4f589de10000.4f5924240000.0001.mml.600300484@EX2K7-CCR.AAD.GOV.AU> Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: multipart/related; boundary="_004_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_"; type="multipart/alternative" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_004_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_ Content-Type: multipart/alternative; boundary="_000_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_" --_000_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Still not sure what's going on, but I've got the openJPA source code into= =20Eclipse to try to debug it properly and am now getting the following e= rror (with same test program as below) Exception in thread "main" java.lang.ExceptionInInitializerError =20 at org.apache.openjpa.conf.BrokerFactoryValue.(BrokerFac= toryValue.java:49) =20 at org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJ= PAConfigurationImpl.java:228) =20 at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.(JDB= CConfigurationImpl.java:122) =20 at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.(JDB= CConfigurationImpl.java:112) =20 at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.(JDB= CConfigurationImpl.java:103) =20 at au.gov.aad.reverse.main(reverse.java:19) Caused by: java.util.MissingResourceException: localized message key: no-= product-derivations; substitutions: [org.apache.openjpa.lib.conf.ProductD= erivation, ProductDerivations: 0] =20 at org.apache.openjpa.lib.conf.ProductDerivations.(Produ= ctDerivations.java:87) =20 ... 6 more Stephen Cameron Antarctic Fisheries Computing and Database Support Provider Australian Antarctic Division Kingston, Tasmania [cid:image001.jpg@01CCFDED.79408610] Phone: 03 62323571 From: Steve Cameron Sent: Thursday, 8 March 2012 10:44 PM To: dev@openjpa.apache.org Subject: more details on SQL Server reverse mapping problem[SEC=3DUNCLASS= IFIED] I have written a little program as follows: import java.io.File; import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl; import org.apache.openjpa.jdbc.meta.ReverseMappingTool; public class reverse { =20 private static ReverseMappingTool tool; =20 private static JDBCConfigurationImpl conf; =20 /** =20 * @param args =20 */ =20 public static void main(String[] args) { =20 // TODO Auto-generated method stub =20 conf =3D new JDBCConfigurationImpl(); =20 conf.setConnectionDriverName("com.microsoft.sqlserver.jdb= c.SQLServerDriver"); =20 conf.setConnectionURL("jdbc:sqlserver://localhost\\SQLEXP= RESS;databaseName=3DFishlog"); =20 conf.setConnectionUserName("sa"); =20 conf.setConnectionPassword("password"); =20 tool =3D new ReverseMappingTool(conf); =20 tool.setDirectory(new File("c:/temp/fishlog.xml")); =20 tool.setPackageName("au.gov.aad"); =20 try{ =20 tool.run(); =20 } =20 catch(Exception e){ =20 e.printStackTrace(); =20 } =20 } } In Eclipse I can see an untrapped ClassNotFoundException being thrown (no= t sure why at this stage). Refering to "org.apache.openjpa.jdbc.schema.SchemaGenerator" At ReverseMappingTool.getSchemaGroup() line 610 See attached screendump as well Stephen Cameron Antarctic Fisheries Computing and Database Support Provider Australian Antarctic Division Kingston, Tasmania [cid:image001.jpg@01CCFDED.79408610] Phone: 03 62323571 _________________________________________________________________________= __ =20 Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you a= re not the intended recipient, you are notified that use or dissemination of this co= mmunication is strictly prohibited by Commonwealth law. If you have received this transm= ission in error, please notify the sender immediately by e-mail or by telephoning +61 3 62= 32 3209 and DELETE the message. =20 Visit our web site at http://www.antarctica.gov.au/ _________________________________________________________________________= __ _________________________________________________________________________= __ =20 Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you a= re not the intended recipient, you are notified that use or dissemination of this co= mmunication is strictly prohibited by Commonwealth law. If you have received this transm= ission in error, please notify the sender immediately by e-mail or by telephoning +61 3 62= 32 3209 and DELETE the message. =20 Visit our web site at http://www.antarctica.gov.au/ _________________________________________________________________________= __ --_000_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Still not sure what’s going on, but I’ve got = the openJPA source code into Eclipse to try to debug it properly and am n= ow getting the following error (with same test program as below)

&nbs= p;

Exception in= =20thread "main" java.lang.ExceptionInInitializerError

     =   at org.apache.openjpa.conf.BrokerFactoryValue.<clinit>(Bro= kerFactoryValue.java:49)

       at org.apache.openjpa.conf.Open= JPAConfigurationImpl.<init>(OpenJPAConfigurationImpl.java:228)<= /span>

    = ;   at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<i= nit>(JDBCConfigurationImpl.java:122)

       at org.apach= e.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfiguratio= nImpl.java:112)

&nbs= p;      at org.apache.openjpa.jdbc.conf.JDBCConf= igurationImpl.<init>(JDBCConfigurationImpl.java:103)

<= p class=3DMsoNormal style=3D'text-autospace:none'>     &n= bsp; at au.gov.aad.reverse.main(reverse.java:19)

Caused by: java.util.MissingResourceExcep= tion: localized message key: no-product-derivations; substitutions: [or= g.apache.openjpa.lib.conf.ProductDerivation, ProductDerivations: 0]=

    &nb= sp;  at org.apache.openjpa.lib.conf.ProductDerivations.<clinit>= ;(ProductDerivations.java:87)

   =     ... 6 more

<= span style=3D'font-size:10.0pt;font-family:Consolas;color:red'> = ;

 

 

 

 

Stephen Cameron

Antarctic Fisheries Computing and Data= base Support Provider

Australian Antarctic Division

Kingston= , Tasmania

 

3D"EmailSig

Phone: 03 623235= 71

 

= From: Steve Cameron
Sent: Thursday= , 8 March 2012 10:44 PM
To: dev@openjpa.apache.org
Subjec= t: more details on SQL Server reverse mapping problem[SEC=3DUNCLASSIF= IED]

 

I have written a little program as follows:

 

import java.io.File;

import org.apache.openjpa.jd= bc.conf.JDBCConfigurationImpl;

import<= /b> org= .apache.openjpa.jdbc.meta.ReverseMappingTool;

 

public class reverse {

       <= span style=3D'font-size:10.0pt;font-family:Consolas'>

    &nb= sp;  private static ReverseMappingTool <= span style=3D'font-size:10.0pt;font-family:Consolas;color:#0000C0'>tool;

  &nbs= p;    private static JDBCConfigurationImp= l conf;

 

  &nbs= p;    /**

       * @param args

   &n= bsp;   */

=        public static void main(String[] args) {

          &= nbsp;  // TODO Auto-generated method stub

     &nb= sp;       conf =3D new<= /b> JDB= CConfigurationImpl();

            &nbs= p; conf.setConnectionDriverName("com.microsoft.sqlserver.= jdbc.SQLServerDriver");

           &nb= sp;  conf.setConnectionURL("jdbc:sqlserver://localho= st\\SQLEXPRESS;databaseName=3DFishlog");

        = ;     conf.setConnectionUserName("sa&= quot;);=

 &nbs= p;           = conf<= /span>.setConnectionPassword("password");

       =       tool =3D new ReverseMa= ppingTool(conf);

           &= nbsp; tool.setDirectory(new File("c:/temp/fishlo= g.xml"));

 = ;            = tool.setPackageName("au.gov.aad");

       =       try{

        =             t= ool.run();

 = ;            }

    = ;         catch(Exception e){= <= /p>

    &n= bsp;           &nb= sp;   e.printStackTrace();

         &nbs= p;   }

&nb= sp;      }

 

}

 

In Eclipse I ca= n see an untrapped ClassNotFoundException being thrown (not sure why at t= his stage).

 

Refering to “org.apache.openjpa.jdbc.schema.SchemaG= enerator”

 

<= p class=3DMsoNormal>At ReverseMappingTool.getSchemaGroup() line 610<= /o:p>

 

S= ee attached screendump as well

&n= bsp;

 

Stephen Cameron

Antarctic Fisherie= s Computing and Database Support Provider

Australian Antarctic Division

Kingston, Tasmania<= /p>

 

3D"EmailSig

= Phone: 03 62323571

 

____________________________________________________________________= _______

    Australian Antarctic Division= =20- Commonwealth of Australia
IMPORTANT: This transmission is intende= d for the addressee only. If you are not the
intended recipient, you a= re notified that use or dissemination of this communication is
strictl= y prohibited by Commonwealth law. If you have received this transmission = in error,
please notify the sender immediately by e-mail or by telepho= ning +61 3 6232 3209 and
DELETE the message.
   &nbs= p;    Visit our web site at http://www.antarctica.gov.au/
________________________= ___________________________________________________

______________________________________________________________________= _____

    Australian Antarctic Division - Commonwealth of=20 Australia
IMPORTANT: This transmission is intended for the addressee o= nly. If=20 you are not the
intended recipient, you are notified that use or=20 dissemination of this communication is
strictly prohibited by Commonwe= alth=20 law. If you have received this transmission in error,
please notify th= e=20 sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DEL= ETE the=20 message.
        Visit our web site= =20at http://www.antarctica.gov.au/<= BR>______________________________________________________________________= _____

--_000_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_-- --_004_410C0E47580EB147811BB64E83936A3F3EE5210166EX2K7CCRAADGO_--