Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [TENEO] Exception in HibernateDatastore
[TENEO] Exception in HibernateDatastore [message #1111646] |
Wed, 18 September 2013 14:20 |
Murthy Bhat Messages: 159 Registered: July 2009 |
Senior Member |
|
|
I am trying to serialize a simple emf model to database using teneo-hibernate(in Virgo). However, when I am trying to initialize the datastore, I get the below error.
org.hibernate.MappingException: Could not determine type for: org.eclipse.emf.teneo.hibernate.mapping.econtainer.EContainerUserType, for columns: [org.hibernate.mapping.Column(econtainer_class), org.hibernate.mapping.Column(e_container)]
org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:304
Looking at many posts, I did try adding Eclipse-BuddyPolicy: dependent (also tried Bundle-BuddyPolicy: dependent) but no success. I added it in the dataaccess bundle and model bundle. My HBdatastore has following properties
Properties props = new Properties();
props.setProperty(Environment.DRIVER, DatastoreConstants.DRIVER);
props.setProperty(Environment.URL, DatastoreConstants.URL);
props.setProperty(Environment.USER, DatastoreConstants.USER);
props.setProperty(Environment.PASS, DatastoreConstants.PASS);
props.setProperty(Environment.DIALECT,MySQL5Dialect.class.getName());
props.setProperty(Environment.SHOW_SQL, DatastoreConstants.SHOW_SQL);
props.setProperty(Environment.HBM2DDL_AUTO, DatastoreConstants.HBM2DDL_AUTO);
props.setProperty(PersistenceOptions.FETCH_CONTAINMENT_EAGERLY, "true");
props.setProperty(PersistenceOptions.FETCH_ASSOCIATION_EXTRA_LAZY, "false");
props.setProperty(PersistenceOptions.SET_DEFAULT_CASCADE_ON_NON_CONTAINMENT,"true");
props.setProperty(PersistenceOptions.CASCADE_POLICY_ON_NON_CONTAINMENT, "REFRESH,PERSIST,MERGE");
props.setProperty(PersistenceOptions.INHERITANCE_MAPPING,"JOINED");
Am I missing any configuration ?
|
|
|
Re: [TENEO] Exception in HibernateDatastore [message #1111655 is a reply to message #1111646] |
Wed, 18 September 2013 14:38 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hey Murthy,
Could be indeed some plugin dependency thing. Which hibernate plugin are you using?
gr. Martin
On 09/18/2013 04:21 PM, Murthy Bhat wrote:
> I am trying to serialize a simple emf model to database using teneo-hibernate(in Virgo). However, when I am trying to
> initialize the datastore, I get the below error.
>
> org.hibernate.MappingException: Could not determine type for:
> org.eclipse.emf.teneo.hibernate.mapping.econtainer.EContainerUserType, for columns:
> [org.hibernate.mapping.Column(econtainer_class), org.hibernate.mapping.Column(e_container)]
> org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:304
>
>
>
> Looking at many posts, I did try adding Eclipse-BuddyPolicy: dependent (also tried Bundle-BuddyPolicy: dependent) but no
> success. I added it in the dataaccess bundle and model bundle. My HBdatastore has following properties
>
>
> Properties props = new Properties();
> props.setProperty(Environment.DRIVER, DatastoreConstants.DRIVER);
> props.setProperty(Environment.URL, DatastoreConstants.URL);
> props.setProperty(Environment.USER, DatastoreConstants.USER);
> props.setProperty(Environment.PASS, DatastoreConstants.PASS);
> props.setProperty(Environment.DIALECT,MySQL5Dialect.class.getName());
> props.setProperty(Environment.SHOW_SQL, DatastoreConstants.SHOW_SQL);
> props.setProperty(Environment.HBM2DDL_AUTO, DatastoreConstants.HBM2DDL_AUTO);
> props.setProperty(PersistenceOptions.FETCH_CONTAINMENT_EAGERLY, "true");
> props.setProperty(PersistenceOptions.FETCH_ASSOCIATION_EXTRA_LAZY, "false");
> props.setProperty(PersistenceOptions.SET_DEFAULT_CASCADE_ON_NON_CONTAINMENT,"true");
> props.setProperty(PersistenceOptions.CASCADE_POLICY_ON_NON_CONTAINMENT, "REFRESH,PERSIST,MERGE");
> props.setProperty(PersistenceOptions.INHERITANCE_MAPPING,"JOINED");
>
>
>
> Am I missing any configuration ?
>
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [TENEO] Exception in HibernateDatastore [message #1111662 is a reply to message #1111655] |
Wed, 18 September 2013 14:47 |
Murthy Bhat Messages: 159 Registered: July 2009 |
Senior Member |
|
|
Hello Martin,
I am using hibernate 4.1.0
My manifest is something like below
Import-Package:
org.eclipse.emf.common.notify,
org.eclipse.emf.common.util,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.resource,
org.eclipse.emf.ecore.resource.impl,
org.eclipse.emf.ecore.xmi.impl,
org.eclipse.emf.teneo;version="2.0.1",
org.eclipse.emf.teneo.extension;version="2.0.1",
org.eclipse.emf.teneo.hibernate;version="2.0.1",
org.eclipse.emf.teneo.mapping.strategy;version="2.0.1",
org.eclipse.emf.teneo.mapping.strategy.impl;version="2.0.1",
org.hibernate;version="4.1.0.Final",
org.hibernate.cfg;version="4.1.0.Final",
org.hibernate.dialect;version="4.1.0.Final"
Require-Bundle: powermock-mockito-junit-1.5;bundle-version="1.0.0";resolution:=optional,
org.eclipse.emf.teneo;bundle-version="2.0.1",
org.eclipse.emf.ecore;bundle-version="2.9.0"
Bundle-BuddyPolicy: dependent
Thanks,
Murthy
|
|
|
Re: [TENEO] Exception in HibernateDatastore [message #1111664 is a reply to message #1111662] |
Wed, 18 September 2013 14:49 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Murthy,
Yes but which plugin provides hibernate? Is that the one made available through the elver.org update site? (that one I
manage, so it should work)
gr. Martin
On 09/18/2013 04:47 PM, Murthy Bhat wrote:
> Hello Martin,
> I am using hibernate 4.1.0
> My manifest is something like below
>
> Import-Package: org.eclipse.emf.common.notify,
> org.eclipse.emf.common.util,
> org.eclipse.emf.ecore,
> org.eclipse.emf.ecore.resource,
> org.eclipse.emf.ecore.resource.impl,
> org.eclipse.emf.ecore.xmi.impl,
> org.eclipse.emf.teneo;version="2.0.1",
> org.eclipse.emf.teneo.extension;version="2.0.1",
> org.eclipse.emf.teneo.hibernate;version="2.0.1",
> org.eclipse.emf.teneo.mapping.strategy;version="2.0.1",
> org.eclipse.emf.teneo.mapping.strategy.impl;version="2.0.1",
> org.hibernate;version="4.1.0.Final",
> org.hibernate.cfg;version="4.1.0.Final",
> org.hibernate.dialect;version="4.1.0.Final"
> Require-Bundle: powermock-mockito-junit-1.5;bundle-version="1.0.0";resolution:=optional,
> org.eclipse.emf.teneo;bundle-version="2.0.1",
> org.eclipse.emf.ecore;bundle-version="2.9.0"
> Bundle-BuddyPolicy: dependent
>
> Thanks,
> Murthy
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| | | |
Goto Forum:
Current Time: Mon Sep 23 20:22:03 GMT 2024
Powered by FUDForum. Page generated in 0.03731 seconds
|