Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO/Teneo Unable to instantiate tuplizer - name collision
CDO/Teneo Unable to instantiate tuplizer - name collision [message #902827] Mon, 20 August 2012 16:02 Go to next message
rumburak r is currently offline rumburak rFriend
Messages: 17
Registered: July 2011
Junior Member
Hi,

I would like to get lazy loading of many-to-one associations so in order to control this lazy setting I have tried to test with CDO 4.0, Hibernate 3.6 and Teneo 1.2 the following cases:
1) the annotation "@Proxy(lazy=true)" on a particular eclass,
2) the general option "teneo.mapping.set_proxy" to true,
3) the general option "teneo.mapping.force_lazy" to true (and "teneo.mapping.set_proxy" to false),
But I always get a entity name collision exception like this as listed below. Even when I had created very simple ecore model I got it.
I do not know if it matters at all but I have noticed that for all described cases an extra hibernate-mapping element "class name" is specified (besides an "entity name" that is always added). And after the dynamic-map tuplizer creation Hibernate tries to build the pojo tuplizer (maybe the already created dynamic-map one should be used).

Is there something I should adjust before using those cases?

Regards,
Rumburak


ad1 @Proxy(lazy=true) OR ad2 "teneo.mapping.set_proxy"="true"

[The hibernate-mapping element]
<class name="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl" entity-name="XYZ" abstract="false" lazy="true" table="`XYZ`" proxy="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl">
<meta attribute="eclassName" inherit="false">XYZ</meta>
<meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/CDO/examples/simple/1.0.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>


[ERROR]
Unable to instantiate default tuplizer [org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer]
org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer]
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:80)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:83)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:473)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:284)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getHibernateSessionFactory(HibernateStore.java:256)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.beginHibernateSession(HibernateStoreAccessor.java:193)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.getHibernateSession(HibernateStoreAccessor.java:267)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.queryResources(HibernateStoreAccessor.java:494)
at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.readResourceID(StoreAccessorBase.java:213)
at org.eclipse.emf.cdo.internal.server.Repository.readRootResource(Repository.java:1484)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1579)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:111)
at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
... 25 more
Caused by: java.lang.IllegalArgumentException: There is a entity name collision for EClasses simple.XYZ/simple.XYZ
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.addEntityNameEClassMapping(HibernateStore.java:151)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.initEClass(CDORevisionTuplizer.java:129)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.buildPropertyGetter(CDORevisionTuplizer.java:187)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:136)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.<init>(CDORevisionTuplizer.java:59)
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 57
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 45
Constructor<T>.newInstance(Object...) line: 532
EntityTuplizerFactory.constructTuplizer(Class<EntityTuplizer>, EntityMetamodel, PersistentClass) line: 105
EntityTuplizerFactory.constructTuplizer(String, EntityMetamodel, PersistentClass) line: 80
EntityEntityModeToTuplizerMapping.<init>(PersistentClass, EntityMetamodel) line: 83
EntityMetamodel.<init>(PersistentClass, SessionFactoryImplementor) line: 322
JoinedSubclassEntityPersister(AbstractEntityPersister).<init>(PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor) line: 473
JoinedSubclassEntityPersister.<init>(PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor, Mapping) line: 122
PersisterFactory.createClassPersister(PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor, Mapping) line: 87
SessionFactoryImpl.<init>(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver) line: 284
Configuration.buildSessionFactory() line: 1842
HibernateStore.getHibernateSessionFactory() line: 256
HibernateStoreAccessor.beginHibernateSession() line: 193
HibernateStoreAccessor.getHibernateSession() line: 267
HibernateStoreAccessor.queryResources(IStoreAccessor$QueryResourcesContext) line: 494
HibernateStoreAccessor(StoreAccessorBase).readResourceID(CDOID, String, CDOBranchPoint) line: 213
Repository$Default(Repository).readRootResource() line: 1484
Repository$Default(Repository).doActivate() line: 1579
Repository$Default(Lifecycle).activate() line: 72
LifecycleUtil.activate(Object, boolean) line: 99
LifecycleUtil.activate(Object) line: 89
CDOServerUtil.addRepository(IManagedContainer, IRepository) line: 201
RepositoryConfigurator.configure(File) line: 111
CDOServerApplication.doStart() line: 61
CDOServerApplication(OSGiApplication).start(IApplicationContext) line: 61
EclipseAppHandle.run(Object) line: 196
AnyThreadAppLauncher.run() line: 26
Thread.run() line: 636

ad3. "teneo.mapping.force_lazy" ="true" "teneo.mapping.set_proxy"="false"

[The hibernate-mapping element]
<joined-subclass name="org.eclipse.emf.cdo.etypes.impl.AnnotationImpl" entity-name="Annotation" abstract="false" lazy="true" extends="ModelElement" table="`annotation`">
<meta attribute="eclassName" inherit="false">Annotation</meta>
<meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/CDO/Etypes/4.0.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>

...
...
Caused by: java.lang.IllegalArgumentException: There is a entity name collision for EClasses etypes.Annotation/etypes.Annotation
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.addEntityNameEClassMapping(HibernateStore.java:151)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.initEClass(CDORevisionTuplizer.java:129)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.buildPropertyGetter(CDORevisionTuplizer.java:187)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:136)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.<init>(CDORevisionTuplizer.java:59)
... 30 more
Re: CDO/Teneo Unable to instantiate tuplizer - name collision [message #902862 is a reply to message #902827] Mon, 20 August 2012 18:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Rumburak,
Do you see duplicates for XYZ and Annotation in the mapping?

gr. Martin

On 08/20/2012 06:02 PM, rumburak Mising name wrote:
> Hi,
>
> I would like to get lazy loading of many-to-one associations so in order to control this lazy setting I have tried to
> test with CDO 4.0, Hibernate 3.6 and Teneo 1.2 the following cases:
> 1) the annotation "@Proxy(lazy=true)" on a particular eclass,
> 2) the general option "teneo.mapping.set_proxy" to true,
> 3) the general option "teneo.mapping.force_lazy" to true (and "teneo.mapping.set_proxy" to false),
> But I always get a entity name collision exception like this as listed below. Even when I had created very simple ecore
> model I got it.
> I do not know if it matters at all but I have noticed that for all described cases an extra hibernate-mapping element
> "class name" is specified (besides an "entity name" that is always added). And after the dynamic-map tuplizer creation
> Hibernate tries to build the pojo tuplizer (maybe the already created dynamic-map one should be used).
>
> Is there something I should adjust before using those cases?
>
> Regards,
> Rumburak
>
>
> ad1 @Proxy(lazy=true) OR ad2 "teneo.mapping.set_proxy"="true"
>
> [The hibernate-mapping element]
> <class name="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl" entity-name="XYZ" abstract="false"
> lazy="true" table="`XYZ`" proxy="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl">
> <meta attribute="eclassName" inherit="false">XYZ</meta>
> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/CDO/examples/simple/1.0.0</meta>
> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
> <tuplizer entity-mode="dynamic-map"
> class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>
>
> [ERROR]
> Unable to instantiate default tuplizer [org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer]
> org.hibernate.HibernateException: Unable to instantiate default tuplizer
> [org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer]
> at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
> at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:80)
> at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:83)
> at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
> at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:473)
> at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
> at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:284)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getHibernateSessionFactory(HibernateStore.java:256)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.beginHibernateSession(HibernateStoreAccessor.java:193)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.getHibernateSession(HibernateStoreAccessor.java:267)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.queryResources(HibernateStoreAccessor.java:494)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.readResourceID(StoreAccessorBase.java:213)
> at org.eclipse.emf.cdo.internal.server.Repository.readRootResource(Repository.java:1484)
> at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1579)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
> at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
> at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:111)
> at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
> at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
> at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
> ... 25 more
> Caused by: java.lang.IllegalArgumentException: There is a entity name collision for EClasses simple.XYZ/simple.XYZ
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.addEntityNameEClassMapping(HibernateStore.java:151)
> at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.initEClass(CDORevisionTuplizer.java:129)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.buildPropertyGetter(CDORevisionTuplizer.java:187)
>
> at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:136)
> at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.<init>(CDORevisionTuplizer.java:59)
> NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]
> NativeConstructorAccessorImpl.newInstance(Object[]) line: 57
> DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 45
> Constructor<T>.newInstance(Object...) line: 532
> EntityTuplizerFactory.constructTuplizer(Class<EntityTuplizer>, EntityMetamodel, PersistentClass) line: 105
> EntityTuplizerFactory.constructTuplizer(String, EntityMetamodel, PersistentClass) line: 80
> EntityEntityModeToTuplizerMapping.<init>(PersistentClass, EntityMetamodel) line: 83
> EntityMetamodel.<init>(PersistentClass, SessionFactoryImplementor) line: 322
> JoinedSubclassEntityPersister(AbstractEntityPersister).<init>(PersistentClass, EntityRegionAccessStrategy,
> SessionFactoryImplementor) line: 473
> JoinedSubclassEntityPersister.<init>(PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor,
> Mapping) line: 122
> PersisterFactory.createClassPersister(PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor,
> Mapping) line: 87
> SessionFactoryImpl.<init>(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver) line: 284
> Configuration.buildSessionFactory() line: 1842
> HibernateStore.getHibernateSessionFactory() line: 256
> HibernateStoreAccessor.beginHibernateSession() line: 193
> HibernateStoreAccessor.getHibernateSession() line: 267
> HibernateStoreAccessor.queryResources(IStoreAccessor$QueryResourcesContext) line: 494
> HibernateStoreAccessor(StoreAccessorBase).readResourceID(CDOID, String, CDOBranchPoint) line: 213
> Repository$Default(Repository).readRootResource() line: 1484
> Repository$Default(Repository).doActivate() line: 1579
> Repository$Default(Lifecycle).activate() line: 72
> LifecycleUtil.activate(Object, boolean) line: 99
> LifecycleUtil.activate(Object) line: 89
> CDOServerUtil.addRepository(IManagedContainer, IRepository) line: 201
> RepositoryConfigurator.configure(File) line: 111
> CDOServerApplication.doStart() line: 61
> CDOServerApplication(OSGiApplication).start(IApplicationContext) line: 61
> EclipseAppHandle.run(Object) line: 196
> AnyThreadAppLauncher.run() line: 26
> Thread.run() line: 636
>
> ad3. "teneo.mapping.force_lazy" ="true" "teneo.mapping.set_proxy"="false"
>
> [The hibernate-mapping element]
> <joined-subclass name="org.eclipse.emf.cdo.etypes.impl.AnnotationImpl" entity-name="Annotation" abstract="false"
> lazy="true" extends="ModelElement" table="`annotation`">
> <meta attribute="eclassName" inherit="false">Annotation</meta>
> <meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/CDO/Etypes/4.0.0</meta>
> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
> <tuplizer entity-mode="dynamic-map"
> class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>
> ...
> ...
> Caused by: java.lang.IllegalArgumentException: There is a entity name collision for EClasses
> etypes.Annotation/etypes.Annotation
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.addEntityNameEClassMapping(HibernateStore.java:151)
> at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.initEClass(CDORevisionTuplizer.java:129)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.buildPropertyGetter(CDORevisionTuplizer.java:187)
>
> at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:136)
> at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer.<init>(CDORevisionTuplizer.java:59)
> ... 30 more
>


--

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: CDO/Teneo Unable to instantiate tuplizer - name collision [message #902878 is a reply to message #902862] Mon, 20 August 2012 20:41 Go to previous messageGo to next message
rumburak r is currently offline rumburak rFriend
Messages: 17
Registered: July 2011
Junior Member
Martin taal wrote on Mon, 20 August 2012 14:35
Hi Rumburak,
Do you see duplicates for XYZ and Annotation in the mapping?
gr. Martin


Hi Martin,
No, I have not seen any duplicates in the mapping.
For the annotation "@Proxy(lazy=true)" case I have reduced my research to the smallest model. Therefore the model is so tiny (one EClass with one EAttribute only) that I hope there is no objections to attach its mapping on this forum as listed below. If I do not use this annotation everything works fine but with this annotation I get the entity name collision for EClasses simple.XYZ/simple.XYZ exception.

Regards,
Rumburak

mapping

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http***hibernate-mapping-3.0.dtd">

<hibernate-mapping auto-import="false">
<typedef name="etypes.Blob" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOCustomTypeUserType">
<param name="epackage">http***Etypes/4.0.0</param>
<param name="edatatype">Blob</param>
</typedef>
<typedef name="etypes.Clob" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOCustomTypeUserType">
<param name="epackage">http***Etypes/4.0.0</param>
<param name="edatatype">Clob</param>
</typedef>
<class entity-name="ModelElement" abstract="true" lazy="true" table="`modelelement`">
<meta attribute="eclassName" inherit="false">ModelElement</meta>
<meta attribute="epackage" inherit="false">http***Etypes/4.0.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<id type="long" name="idcol" column="idcol" access="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOSyntheticIdPropertyHandler">
<meta attribute="syntheticId" inherit="false">true</meta>
<generator class="native"/>
</id>
<property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
<column name="resource_id"/>
</property>
<property name="containerID" type="string">
<column name="container_id"/>
</property>
<property name="version" type="java.lang.Integer">
<meta attribute="version">true</meta>
<column name="version"/>
</property>
<property name="commit_TimeStamp" type="java.lang.Long"/>
<list name="annotations" lazy="true" cascade="all,delete-orphan">
<key update="true">
<column name="`annotation_modelelement_e_id`" unique="false" index="ModelElement_annotations"/>
</key>
<list-index column="`modelelement_annotations_idx`"/>
<one-to-many entity-name="Annotation"/>
</list>
</class>
<joined-subclass entity-name="Annotation" abstract="false" lazy="true" extends="ModelElement" table="`annotation`">
<meta attribute="eclassName" inherit="false">Annotation</meta>
<meta attribute="epackage" inherit="false">http***Etypes/4.0.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<key>
<column name="`modelelement_e_id`"/>
</key>
<property name="source" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`source`"/>
</property>
<list name="details" lazy="true" cascade="all,delete-orphan">
<key update="true">
<column name="`annotation_details_e_id`" unique="false" index="Annotation_details"/>
</key>
<list-index column="`annotation_details_idx`"/>
<element>
<type name="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDExternalUserType">
<param name="eclassName">EStringToStringMapEntry</param>
<param name="epackage">http***Ecore</param>
</type>
</element>
</list>
<many-to-one name="modelElement" entity-name="ModelElement" lazy="false" cascade="merge,persist,save-update,lock" foreign-key="annotation_modelelement" insert="false" update="false" not-null="false">
<column not-null="false" unique="false" name="`annotation_modelelement_e_id`" index="Annotation_modelElement,Annotation_modelElement"/>
</many-to-one>
<list name="contents" table="`annotationcontents`" lazy="true" cascade="all,delete-orphan">
<key update="true" foreign-key="annotationcontents">
<column name="`annotation_e_id`" unique="false" index="Annotationcontents"/>
</key>
<list-index column="`annotationcontents_idx`"/>
<many-to-any id-type="long" meta-type="string">
<column not-null="false" unique="false" name="`contents_type`" index="Annotationcontents"/>
<column not-null="false" unique="false" name="`contents_id`" index="Annotationcontents"/>
</many-to-any>
</list>
<list name="references" table="`annotation_references`" lazy="true" cascade="persist,merge,save-update,lock">
<key update="true" foreign-key="annotation_references">
<column name="`annotation_e_id`" unique="false" index="Annotation_references"/>
</key>
<list-index column="`annotation_references_idx`"/>
<many-to-any id-type="long" meta-type="string">
<column not-null="false" unique="false" name="`references_type`" index="Annotation_references"/>
<column not-null="false" unique="false" name="`references_id`" index="Annotation_references"/>
</many-to-any>
</list>
</joined-subclass>
<class name="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl" entity-name="XYZ" abstract="false" lazy="true" table="`xyz`" proxy="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl">
<meta attribute="eclassName" inherit="false">XYZ</meta>
<meta attribute="epackage" inherit="false">http***/simple/1.0.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<id type="long" name="idcol" column="idcol" access="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOSyntheticIdPropertyHandler">
<meta attribute="syntheticId" inherit="false">true</meta>
<generator class="native"/>
</id>
<property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
<column name="resource_id"/>
</property>
<property name="containerID" type="string">
<column name="container_id"/>
</property>
<property name="version" type="java.lang.Integer">
<meta attribute="version">true</meta>
<column name="version"/>
</property>
<property name="commit_TimeStamp" type="java.lang.Long"/>
<property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`name`"/>
</property>
</class>
</hibernate-mapping>
Re: CDO/Teneo Unable to instantiate tuplizer - name collision [message #902884 is a reply to message #902878] Mon, 20 August 2012 22:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Rumburak,
Can you create a bugzilla with the example model? Have you tried with the latest cdo/teneo versions?
This issue (if it is an issue) will probably be solved in the current/latest build of CDO/Teneo and not in older versions...

gr. Martin

On 08/20/2012 10:42 PM, rumburak Mising name wrote:
> Martin taal wrote on Mon, 20 August 2012 14:35
>> Hi Rumburak,
>> Do you see duplicates for XYZ and Annotation in the mapping?
>> gr. Martin
>
>
> Hi Martin,
> No, I have not seen any duplicates in the mapping. For the annotation "@Proxy(lazy=true)" case I have reduced my
> research to the smallest model. Therefore the model is so tiny (one EClass with one EAttribute only) that I hope there
> is no objections to attach its mapping on this forum as listed below. If I do not use this annotation everything works
> fine but with this annotation I get the entity name collision for EClasses simple.XYZ/simple.XYZ exception.
>
> Regards,
> Rumburak
>
> mapping
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http***hibernate-mapping-3.0.dtd">
>>
>> <hibernate-mapping auto-import="false">
>> <typedef name="etypes.Blob" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOCustomTypeUserType">
>> <param name="epackage">http***Etypes/4.0.0</param>
>> <param name="edatatype">Blob</param>
>> </typedef>
>> <typedef name="etypes.Clob" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOCustomTypeUserType">
>> <param name="epackage">http***Etypes/4.0.0</param>
>> <param name="edatatype">Clob</param>
>> </typedef>
>> <class entity-name="ModelElement" abstract="true" lazy="true" table="`modelelement`">
>> <meta attribute="eclassName" inherit="false">ModelElement</meta>
>> <meta attribute="epackage" inherit="false">http***Etypes/4.0.0</meta>
>> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <tuplizer entity-mode="dynamic-map"
>> class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <id type="long" name="idcol" column="idcol"
>> access="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOSyntheticIdPropertyHandler">
>> <meta attribute="syntheticId" inherit="false">true</meta>
>> <generator class="native"/>
>> </id>
>> <property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
>> <column name="resource_id"/>
>> </property>
>> <property name="containerID" type="string">
>> <column name="container_id"/>
>> </property>
>> <property name="version" type="java.lang.Integer">
>> <meta attribute="version">true</meta>
>> <column name="version"/>
>> </property>
>> <property name="commit_TimeStamp" type="java.lang.Long"/>
>> <list name="annotations" lazy="true" cascade="all,delete-orphan">
>> <key update="true">
>> <column name="`annotation_modelelement_e_id`" unique="false" index="ModelElement_annotations"/>
>> </key>
>> <list-index column="`modelelement_annotations_idx`"/>
>> <one-to-many entity-name="Annotation"/>
>> </list>
>> </class>
>> <joined-subclass entity-name="Annotation" abstract="false" lazy="true" extends="ModelElement" table="`annotation`">
>> <meta attribute="eclassName" inherit="false">Annotation</meta>
>> <meta attribute="epackage" inherit="false">http***Etypes/4.0.0</meta>
>> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <tuplizer entity-mode="dynamic-map"
>> class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <key>
>> <column name="`modelelement_e_id`"/>
>> </key>
>> <property name="source" lazy="false" insert="true" update="true" not-null="false" unique="false"
>> type="java.lang.String">
>> <column not-null="false" unique="false" name="`source`"/>
>> </property>
>> <list name="details" lazy="true" cascade="all,delete-orphan">
>> <key update="true">
>> <column name="`annotation_details_e_id`" unique="false" index="Annotation_details"/>
>> </key>
>> <list-index column="`annotation_details_idx`"/>
>> <element>
>> <type name="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDExternalUserType">
>> <param name="eclassName">EStringToStringMapEntry</param>
>> <param name="epackage">http***Ecore</param>
>> </type>
>> </element>
>> </list>
>> <many-to-one name="modelElement" entity-name="ModelElement" lazy="false"
>> cascade="merge,persist,save-update,lock" foreign-key="annotation_modelelement" insert="false" update="false"
>> not-null="false">
>> <column not-null="false" unique="false" name="`annotation_modelelement_e_id`"
>> index="Annotation_modelElement,Annotation_modelElement"/>
>> </many-to-one>
>> <list name="contents" table="`annotationcontents`" lazy="true" cascade="all,delete-orphan">
>> <key update="true" foreign-key="annotationcontents">
>> <column name="`annotation_e_id`" unique="false" index="Annotationcontents"/>
>> </key>
>> <list-index column="`annotationcontents_idx`"/>
>> <many-to-any id-type="long" meta-type="string">
>> <column not-null="false" unique="false" name="`contents_type`" index="Annotationcontents"/>
>> <column not-null="false" unique="false" name="`contents_id`" index="Annotationcontents"/>
>> </many-to-any>
>> </list>
>> <list name="references" table="`annotation_references`" lazy="true" cascade="persist,merge,save-update,lock">
>> <key update="true" foreign-key="annotation_references">
>> <column name="`annotation_e_id`" unique="false" index="Annotation_references"/>
>> </key>
>> <list-index column="`annotation_references_idx`"/>
>> <many-to-any id-type="long" meta-type="string">
>> <column not-null="false" unique="false" name="`references_type`" index="Annotation_references"/>
>> <column not-null="false" unique="false" name="`references_id`" index="Annotation_references"/>
>> </many-to-any>
>> </list>
>> </joined-subclass>
>> <class name="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl" entity-name="XYZ" abstract="false"
>> lazy="true" table="`xyz`" proxy="org.eclipse.emf.internal.cdo.object.DynamicCDOObjectImpl">
>> <meta attribute="eclassName" inherit="false">XYZ</meta>
>> <meta attribute="epackage" inherit="false">http***/simple/1.0.0</meta>
>> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <tuplizer entity-mode="dynamic-map"
>> class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
>> <id type="long" name="idcol" column="idcol"
>> access="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOSyntheticIdPropertyHandler">
>> <meta attribute="syntheticId" inherit="false">true</meta>
>> <generator class="native"/>
>> </id>
>> <property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
>> <column name="resource_id"/>
>> </property>
>> <property name="containerID" type="string">
>> <column name="container_id"/>
>> </property>
>> <property name="version" type="java.lang.Integer">
>> <meta attribute="version">true</meta>
>> <column name="version"/>
>> </property>
>> <property name="commit_TimeStamp" type="java.lang.Long"/>
>> <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false"
>> type="java.lang.String">
>> <column not-null="false" unique="false" name="`name`"/>
>> </property>
>> </class>
>> </hibernate-mapping>
>


--

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: CDO/Teneo Unable to instantiate tuplizer - name collision [message #903176 is a reply to message #902884] Wed, 22 August 2012 12:12 Go to previous message
rumburak r is currently offline rumburak rFriend
Messages: 17
Registered: July 2011
Junior Member
Martin taal wrote on Mon, 20 August 2012 18:00
Hi Rumburak,
Can you create a bugzilla with the example model? Have you tried with the latest cdo/teneo versions?
This issue (if it is an issue) will probably be solved in the current/latest build of CDO/Teneo and not in older versions...
gr. Martin


Hi,
Just to inform you. I have resigned from my research for the older versions. I have tried this annotation "@Proxy(lazy=true)" with the latest cdo/teneo versions (CDO 4.1, Hibernate 4.1, Teneo/Hibernate 2.0) and there is no collision exceptions. So I have not created any bugzilla stuff.

Regards,
Rumburak
Previous Topic:[CDO] CDO thread prevent JVM to exit on client side standalone
Next Topic:[CDO] Pessimistic lock with EMF Transaction
Goto Forum:
  


Current Time: Sat Nov 22 21:31:27 GMT 2014

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

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