Doing something like this... Options opts = new Options(); String[] toolArgs = opts.setFromCmdLine(options); MappingTool.run(conf, toolArgs,opts);
conf contains the openjpa.ConnectionFactory object that obtains connections. it does not contain the openjpa.user (etc) properties toolArgs are empty opts contains -schemaAction -a The error is that inside jpa the metaDataFactory cannot be created MetaDataException MetaDataFactory could not be configured (conf.newMetaDataFactoryInstance() returned null). This might mean that no configuration properties were found. Ensure that you have a META-INF/persistence.xml file, that it is available in your classpath, or that the properties file you are using for configuration is available. If you are using Ant, please see the <properties> or <propertiesFile> attributes of the task's nested <config> element. This can also occur if your OpenJPA distribution jars are corrupt, or if your security policy is overly strict. -- View this message in context: http://n2.nabble.com/Mapping-tool-and-openjpa.ConnectionFactory-tp2334727p2334727.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
