Problem with dataStore.initialize() with the eclipse.org/bpel - model [message #609488] |
Tue, 21 August 2007 11:41 |
user Messages: 296 Registered: July 2009 |
Senior Member |
|
|
Hi,
i have a problem with the generation of the hibernate-mapping file.
My model project is the standard Bpel-Model from www.eclipse.org/bpel/.
I use Eclipse 3.3 WTP. And teneo 0.8. The code of the DB initialization is:
public static void main(String[] args) {
final String dataStoreName = "bpel20";
final HbDataStore dataStore = (HbDataStore) HbHelper.INSTANCE
.createRegisterDataStore(dataStoreName);
Properties hibernateProperties = new Properties();
hibernateProperties.setProperty(Environment.DRIVER,
"com.mysql.jdbc.Driver");
hibernateProperties.setProperty(Environment.USER, "XXX");
hibernateProperties.setProperty(Environment.URL,
"jdbc:mysql://127.0.0.1:3306/bpel20");
hibernateProperties.setProperty(Environment.PASS, "XXX");
hibernateProperties.setProperty(Environment.DIALECT,
"org.hibernate.dialect.MySQLInnoDBDialect");
dataStore.setHibernateProperties(hibernateProperties);
// coonfig persistence options
Properties persistenceOptions = new Properties();
persistenceOptions.setProperty(PersistenceOptions.INHERITANC E_MAPPING,
"JOINED");
persistenceOptions.setProperty(
PersistenceOptions.FETCH_CONTAINMENT_EAGERLY, "true");
dataStore.setPersistenceProperties(persistenceOptions);
dataStore.setEPackages(new EPackage[] {
org.eclipse.bpel.model.BPELPackage.eINSTANCE });
dataStore.initialize();
}
I get an error at the dataStore initalization. The following error
occured:
(...)
[main] DEBUG org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator
- Creating mapping for eclass Process
1236 [main] DEBUG
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator - Creating
mapping for eclass ExtensibleElement
Exception in thread "main" java.lang.IllegalArgumentException: No
annotated model element present for: ExtensibleElement for type EClass
has its epackage been registered with Teneo?
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:322)
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:268)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:353)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 178)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:362)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 178)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:319)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:210)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:128)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:531)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:149)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:70)
at test.MainTest.createDatabase(MainTest.java:27)
at test.MainTest.main(MainTest.java:19)
|
|
|
Powered by
FUDForum. Page generated in 0.04849 seconds