Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Different object was registered for OID:http://example.com#MyType#c09f11a0-
[CDO] Different object was registered for OID:http://example.com#MyType#c09f11a0- [message #1003591] Mon, 21 January 2013 15:17 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
Registered: July 2009
Senior Member
I am getting the following exception...

- Hibernate store
- Latest CDO 4.2 git sources

java.lang.IllegalStateException: Different object was registered for OID:http://example.com#MyType#c09f11a0-d68a-4570-9cfb-dd310f5d545d
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerObject(AbstractCDOView.java:1302)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:916)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1140)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.convertIDToObject(AbstractCDOView.java:1237)
	at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertIDToObject(CDOStoreImpl.java:686)
	at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:654)
	at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:190)
	at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:527)
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2324)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1027)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
	at com.example.model.impl.MyTypeContainerImpl.getMyType(MyTypeContainerImpl.java:110)
...


Any hints what to look for?
Re: [CDO] Different object was registered for OID:http://example.com#MyType#c09f11a0- [message #1003621 is a reply to message #1003591] Mon, 21 January 2013 16:17 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Erdal,
This can happen when there are references to a parent class/type while the actual instance is a subclass type.

Would this be the case here? So MyTypeContainer refers to a parent type of MyType?

gr. Martin

On 01/21/2013 04:17 PM, Erdal Karaca wrote:
> I am getting the following exception...
>
> - Hibernate store
> - Latest CDO 4.2 git sources
>
>
> java.lang.IllegalStateException: Different object was registered for
> OID:http://example.com#MyType#c09f11a0-d68a-4570-9cfb-dd310f5d545d
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerObject(AbstractCDOView.java:1302)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:916)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1140)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.convertIDToObject(AbstractCDOView.java:1237)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertIDToObject(CDOStoreImpl.java:686)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:654)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:190)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:527)
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2324)
>
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1027)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
> at com.example.model.impl.MyTypeContainerImpl.getMyType(MyTypeContainerImpl.java:110)
> ...
>
>
> Any hints what to look for?


--

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] Different object was registered for OID:http://example.com#MyType#c09f11a0- [message #1003623 is a reply to message #1003621] Mon, 21 January 2013 16:24 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
Registered: July 2009
Senior Member
Yes, that is the case!

MyTypeContainer has a reference to MyType's parent.
The parent has its inheritance type set to SINGLE_TABLE.

How to resolve this?

Martin taal wrote on Mon, 21 January 2013 17:17
Hi Erdal,
This can happen when there are references to a parent class/type while the actual instance is a subclass type.

Would this be the case here? So MyTypeContainer refers to a parent type of MyType?

gr. Martin

On 01/21/2013 04:17 PM, Erdal Karaca wrote:
> I am getting the following exception...
>
> - Hibernate store
> - Latest CDO 4.2 git sources
>
>
> java.lang.IllegalStateException: Different object was registered for
> OID:http://example.com#MyType#c09f11a0-d68a-4570-9cfb-dd310f5d545d
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerObject(AbstractCDOView.java:1302)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:916)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1140)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.convertIDToObject(AbstractCDOView.java:1237)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertIDToObject(CDOStoreImpl.java:686)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:654)
> at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:190)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:527)
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2324)
>
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1027)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
> at com.example.model.impl.MyTypeContainerImpl.getMyType(MyTypeContainerImpl.java:110)
> ...
>
>
> Any hints what to look for?


--

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] Different object was registered for OID:http://example.com#MyType#c09f11a0- [message #1003639 is a reply to message #1003623] Mon, 21 January 2013 17:03 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Erdal,
I solved this earlier for abstract classes. Can you make this parent class abstract and see if it helps?

gr. Martin

On 01/21/2013 05:24 PM, Erdal Karaca wrote:
> Yes, that is the case!
>
> MyTypeContainer has a reference to MyType's parent.
> The parent has its inheritance type set to SINGLE_TABLE.
>
> How to resolve this?
>
> Martin taal wrote on Mon, 21 January 2013 17:17
>> Hi Erdal,
>> This can happen when there are references to a parent class/type while the actual instance is a subclass type.
>>
>> Would this be the case here? So MyTypeContainer refers to a parent type of MyType?
>>
>> gr. Martin
>>
>> On 01/21/2013 04:17 PM, Erdal Karaca wrote:
>> > I am getting the following exception...
>> >
>> > - Hibernate store
>> > - Latest CDO 4.2 git sources
>> >
>> >
>> > java.lang.IllegalStateException: Different object was registered for
>> > OID:http://example.com#MyType#c09f11a0-d68a-4570-9cfb-dd310f5d545d
>> > at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerObject(AbstractCDOView.java:1302)
>> > at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:916)
>> > at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1140)
>> > at org.eclipse.emf.internal.cdo.view.AbstractCDOView.convertIDToObject(AbstractCDOView.java:1237)
>> > at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertIDToObject(CDOStoreImpl.java:686)
>> > at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:654)
>> > at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:190)
>> > at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:527)
>> > at
>> >
>> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2324)
>>
>> >
>> > at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1027)
>> > at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
>> > at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
>> > at com.example.model.impl.MyTypeContainerImpl.getMyType(MyTypeContainerImpl.java:110)
>> > ...
>> >
>> >
>> > Any hints what to look for?
>>
>>
>> --
>>
>> 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
>
>


--

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] Different object was registered for OID:http://example.com#MyType#c09f11a0- [message #1003878 is a reply to message #1003639] Tue, 22 January 2013 07:12 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
Registered: July 2009
Senior Member
That was it, thanks!

Martin taal wrote on Mon, 21 January 2013 18:03
Hi Erdal,
I solved this earlier for abstract classes. Can you make this parent class abstract and see if it helps?

gr. Martin

Previous Topic:[CDO] Get negative version objects in CDOQuery
Next Topic:Manually creating and firing events from inside another listener
Goto Forum:
  


Current Time: Sat Nov 22 21:44:39 GMT 2014

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

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