Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » a strange problem when configure jpoxDataStore
a strange problem when configure jpoxDataStore [message #608803] Thu, 19 July 2007 09:51
Eclipse UserFriend
Originally posted by: danceslower.sina.com

Hi All,
I have meet a strange problem during integrating jpox and derby. an
exception is throwed when i tried to configue the database
connection.Here is the code:
////////////////////////
org.eclipse.osgi.framework.debug.Debug.DEBUG_GENERAL = true;
// set the database connection info, PMFConfiguration is
org.jpox.PMFConfiguration
Properties properties = new Properties();
properties.setProperty(PMFConfiguration.JDO_DATASTORE_DRIVER NAME_PROPERTY,
"org.apache.derby.jdbc.ClientDriver");
properties.setProperty(PMFConfiguration.JDO_DATASTORE_URL_PR OPERTY,
"jdbc:derby://localhost:1527/MyDbTest;");
properties.setProperty(PMFConfiguration.JDO_DATASTORE_USERNA ME_PROPERTY,
"sa");
properties.setProperty(PMFConfiguration.JDO_DATASTORE_PASSWO RD_PROPERTY,
"sa");
properties.setProperty(PMFConfiguration.AUTO_CREATE_TABLES_P ROPERTY, "true");
properties.setProperty(PMFConfiguration.CACHE_LEVEL_1_TYPE_P ROPERTY,
"org.eclipse.emf.teneo.jpox.cache.EMFWeakRefCache");

// create/register the JpoxDataStore, set the db props and the epackages
to persist, initialize creates
// the database
String pmfName = "MyPMF"; // the name of the JpoxDataStore
JpoxDataStore jpoxDataStore =
JpoxHelper.INSTANCE.createRegisterDataStore(pmfName);
jpoxDataStore.setProperties(properties);
jpoxDataStore.setEPackages(new EPackage[] { CustomerPackage.eINSTANCE });
jpoxDataStore.initialize();
////////////////////////
and here is the exception:
////////////////////////
Exception in thread "main" javax.jdo.JDODataStoreException: SQL exception:
Add classes to Catalog "", Schema "SA"
at
org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RD BMSManager.java:2444)
at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.ja va:821)
at
org.eclipse.emf.teneo.jpox.JpoxDataStore.createSchema(JpoxDa taStore.java:518)
at
org.eclipse.emf.teneo.jpox.JpoxDataStore.initialize(JpoxData Store.java:213)
at
com.ibm.crl.bo.tops.util.TestTeneoCustomer.main(TestTeneoCus tomer.java:56)
NestedThrowablesStackTrace:
java.sql.SQLException:
Previous Topic:[EMF Compare] NullViewer opening
Next Topic:a strange problem when configure jpoxDataStore
Goto Forum:
  


Current Time: Tue Aug 16 04:27:21 GMT 2022

Powered by FUDForum. Page generated in 0.02119 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top