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 now getting the following error 
(with same test program as below)

Exception in thread "main" java.lang.ExceptionInInitializerError
       at 
org.apache.openjpa.conf.BrokerFactoryValue.<clinit>(BrokerFactoryValue.java:49)
       at 
org.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(OpenJPAConfigurationImpl.java:228)
       at 
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:122)
       at 
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:112)
       at 
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(JDBCConfigurationImpl.java:103)
       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.ProductDerivation, ProductDerivations: 0]
       at 
org.apache.openjpa.lib.conf.ProductDerivations.<clinit>(ProductDerivations.java:87)
       ... 6 more





Stephen Cameron
Antarctic Fisheries Computing and Database Support Provider
Australian Antarctic Division
Kingston, Tasmania

[cid:[email protected]]
Phone: 03 62323571

From: Steve Cameron
Sent: Thursday, 8 March 2012 10:44 PM
To: [email protected]
Subject: more details on SQL Server reverse mapping problem[SEC=UNCLASSIFIED]

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 {

       private static ReverseMappingTool tool;
       private static JDBCConfigurationImpl conf;

       /**
       * @param args
       */
       public static void main(String[] args) {
             // TODO Auto-generated method stub
             conf = new JDBCConfigurationImpl();
              
conf.setConnectionDriverName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              
conf.setConnectionURL("jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=Fishlog");
             conf.setConnectionUserName("sa");
             conf.setConnectionPassword("password");
             tool = new ReverseMappingTool(conf);
             tool.setDirectory(new File("c:/temp/fishlog.xml"));
             tool.setPackageName("au.gov.aad");
             try{
                    tool.run();
             }
             catch(Exception e){
                    e.printStackTrace();
             }
       }

}

In Eclipse I can see an untrapped ClassNotFoundException being thrown (not 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:[email protected]]
Phone: 03 62323571


___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
        Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________

___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
        Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________

Reply via email to