[Teneo] [EMF] I get a stackoverflow when i try to do a datastore.initialize [message #523793] |
Mon, 29 March 2010 11:20 |
Chandan Rao Messages: 3 Registered: March 2010 |
Junior Member |
|
|
Hi i am new to EMF and Teneo, was trying out integrating teneo after learning the nuances of EMF
Did the following
I downloaded the library.mdl
[ http://help.eclipse.org/ganymede/topic/org.eclipse.emf.doc/t utorials/clibmod/library.mdl ]
and created an EMF project using that. Then in a class i have a main method with the following code
String dataStoreName = "BranchDataStore";
final Properties props = new Properties();
props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
props.setProperty(Environment.USER, "root");
props.setProperty(Environment.URL, " jdbc:mysql://127.0.0.1:3306/library");
props.setProperty(Environment.PASS, "mysql");
props.setProperty(Environment.DIALECT,
org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
HbDataStore dataStore = HbHelper.INSTANCE.createRegisterDataStore(dataStoreName);
dataStore.setProperties(props);
dataStore.setEPackages(new EPackage[] { LibraryPackage.eINSTANCE} );
try {
dataStore.initialize();
} catch (Exception e) {
}
I get the following stackoverflow excpetion at datastore.initialize()
Mar 29, 2010 4:45:51 PM org.eclipse.emf.teneo.hibernate.HbHelper createRegisterDataStore
INFO: Creating emf data store and registering it under name: LibraryDataStore
Mar 29, 2010 4:45:51 PM org.eclipse.emf.teneo.hibernate.HbHelper createRegisterDataStore
INFO: Returning created emf data store, initialize this newly created data store!
Mar 29, 2010 4:45:52 PM org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
INFO: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0rc1
Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Exception in thread "main" java.lang.StackOverflowError
at org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedEMo delElementImpl.eIsSet(PAnnotatedEModelElementImpl.java:218)
Also i tried to check the mapping xml file generated
dataStore.getMappingXML() .. this returned null
Any idea what i am doing wrong?
Thank you
Chandan
[Updated on: Mon, 29 March 2010 11:26] Report message to a moderator
|
|
|
Re: I get a stackoverflow when i try to do a datastore.initialize [message #523796 is a reply to message #523793] |
Mon, 29 March 2010 11:49 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Chandan,
Can you post the last 10-20 lines of the stacktrace? And attach the mdl you are using?
gr. Martin
Chandan Rao wrote:
> Hi i am new to EMF and Teneo, was trying out integrating teneo after
> learning the nuances of EMF
>
> Did the following
>
> I downloaded the library.mdl and created an EMF project using that. Then
> in a class i have a main method with the following code
>
> String dataStoreName = "BranchDataStore";
> final Properties props = new Properties();
> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
> props.setProperty(Environment.USER, "root");
> props.setProperty(Environment.URL,
> "jdbc:mysql://127.0.0.1:3306/library");
> props.setProperty(Environment.PASS, "mysql");
> props.setProperty(Environment.DIALECT,
>
> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>
> HbDataStore dataStore =
> HbHelper.INSTANCE.createRegisterDataStore(dataStoreName);
> dataStore.setProperties(props);
> dataStore.setEPackages(new EPackage[] {
> LibraryPackage.eINSTANCE} );
>
> try {
> dataStore.initialize();
> } catch (Exception e) {
>
> }
>
>
>
> I get the following stackoverflow excpetion at datastore.initialize()
>
> Mar 29, 2010 4:45:51 PM org.eclipse.emf.teneo.hibernate.HbHelper
> createRegisterDataStore
> INFO: Creating emf data store and registering it under name:
> LibraryDataStore
> Mar 29, 2010 4:45:51 PM org.eclipse.emf.teneo.hibernate.HbHelper
> createRegisterDataStore
> INFO: Returning created emf data store, initialize this newly created
> data store!
> Mar 29, 2010 4:45:52 PM
> org.eclipse.emf.teneo.classloader.ClassLoaderResolver
> setClassLoaderStrategy
> INFO: Class loader strategy set to:
> org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
> Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
> INFO: Hibernate 3.0rc1
> Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
> INFO: hibernate.properties not found
> Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
> INFO: using CGLIB reflection optimizer
> Mar 29, 2010 4:45:52 PM org.hibernate.cfg.Environment <clinit>
> INFO: using JDK 1.4 java.sql.Timestamp handling
> Exception in thread "main" java.lang.StackOverflowError
> at org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedEMo
> delElementImpl.eIsSet(PAnnotatedEModelElementImpl.java:218)
>
>
> Also i tried to check the mapping xml file generated
>
> dataStore.getMappingXML() .. this returned null
>
>
> Any idea what i am doing wrong?
>
> Thank you
>
> Chandan
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04740 seconds