Skip to main content



      Home
Home » Modeling » EMF » CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEList.(CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEList.)
CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEList. [message #1234128] Tue, 21 January 2014 04:48 Go to next message
Eclipse UserFriend
Hi all,

I get a ArrayIndexOutOfBoundsException on a CDO rollback during the computation of the knowElementRemovals in ObservableListContentProvider. This happens because on a removeAll a contains call happens to the DelegatingEcoreEList where (as an optimization) the inverse EReference gets used in the contains method. The call to that EObject is not valid anymore, because CDO has already rolled back that Object which yields to a ArrayIndexOutOfBoundsException.

Here the relevant parts of the stack trace:

!ENTRY org.eclipse.core.databinding.observable 4 2 2014-01-21 10:07:27.792
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.databinding.observable".
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 0
at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.getValue(CDOObjectImpl.java:1376)
at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.get(CDOObjectImpl.java:1424)
at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:595)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2574)
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 org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:998)
at org.eclipse.emf.ecore.util.DelegatingEcoreEList.contains(DelegatingEcoreEList.java:477)
at java.util.Collections$UnmodifiableCollection.contains(Collections.java:1057)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.contains(SimplePropertyObservableList.java:131)
at org.eclipse.core.databinding.observable.list.ObservableList.contains(ObservableList.java:78)
at org.eclipse.core.databinding.observable.DecoratingObservableCollection.contains(DecoratingObservableCollection.java:53)
at java.util.AbstractSet.removeAll(AbstractSet.java:176)
at org.eclipse.jface.databinding.viewers.ObservableListContentProvider$Impl.handleListChange(ObservableListContentProvider.java:107)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList.fireListChange(DecoratingObservableList.java:59)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList.handleListChange(DecoratingObservableList.java:97)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList$1.handleListChange(DecoratingObservableList.java:71)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.list.ObservableList.fireListChange(ObservableList.java:73)
at org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList.access$1(DetailObservableList.java:1)
at org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList$1.handleListChange(DetailObservableList.java:48)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.ChangeSupport.fireEvent(ChangeSupport.java:39)
at org.eclipse.core.databinding.observable.list.AbstractObservableList.fireListChange(AbstractObservableList.java:117)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.notifyIfChanged(SimplePropertyObservableList.java:567)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.access$3(SimplePropertyObservableList.java:559)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$2.run(SimplePropertyObservableList.java:78)
at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:148)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:152)
at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:170)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$1.handleEvent(SimplePropertyObservableList.java:74)
at org.eclipse.emf.databinding.internal.EMFPropertyListener$EMFListPropertyListener.notifyChanged(EMFPropertyListener.java:165)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:98)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:86)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.handleRollback(CDOTransactionImpl.java:1604)
at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.rollback(CDOSingleTransactionStrategyImpl.java:115)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.rollback(CDOTransactionImpl.java:1230)



To me this seems to be a bug in the contains method of the DelegatingEcoreEList (I use ecore version 2.9.0.v20130528-0742).

Does anyone know how to fix this?

Greetings
Martin

Re: CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEL [message #1234747 is a reply to message #1234128] Wed, 22 January 2014 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Martin,

Can you provide me with a test case or example code that I can use to reproduce this issue and play with it? Ideally you
attach it to a bugzilla. Please have a look at AbstractCDOTest or, better, one of its many subclasses.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 21.01.2014 14:21, schrieb Martin Platter:
> Hi all,
>
> I get a ArrayIndexOutOfBoundsException on a CDO rollback during the computation of the knowElementRemovals in
> ObservableListContentProvider. This happens because on a removeAll a contains call happens to the DelegatingEcoreEList
> where (as an optimization) the inverse EReference gets used in the contains method. The call to that EObject is not
> valid anymore, because CDO has already rolled back that Object which yields to a ArrayIndexOutOfBoundsException.
> Here the relevant parts of the stack trace:
>
> !ENTRY org.eclipse.core.databinding.observable 4 2 2014-01-21 10:07:27.792
> !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.databinding.observable".
> !STACK 0
> java.lang.ArrayIndexOutOfBoundsException: 0
> at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.getValue(CDOObjectImpl.java:1376)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.get(CDOObjectImpl.java:1424)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:595)
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2574)
> 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 org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:998)
> at org.eclipse.emf.ecore.util.DelegatingEcoreEList.contains(DelegatingEcoreEList.java:477)
> at java.util.Collections$UnmodifiableCollection.contains(Collections.java:1057)
> at
> org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.contains(SimplePropertyObservableList.java:131)
> at org.eclipse.core.databinding.observable.list.ObservableList.contains(ObservableList.java:78)
> at
> org.eclipse.core.databinding.observable.DecoratingObservableCollection.contains(DecoratingObservableCollection.java:53)
> at java.util.AbstractSet.removeAll(AbstractSet.java:176)
> at
> org.eclipse.jface.databinding.viewers.ObservableListContentProvider$Impl.handleListChange(ObservableListContentProvider.java:107)
> at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
> at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
> at
> org.eclipse.core.databinding.observable.list.DecoratingObservableList.fireListChange(DecoratingObservableList.java:59)
> at
> org.eclipse.core.databinding.observable.list.DecoratingObservableList.handleListChange(DecoratingObservableList.java:97)
> at
> org.eclipse.core.databinding.observable.list.DecoratingObservableList$1.handleListChange(DecoratingObservableList.java:71)
> at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
> at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
> at org.eclipse.core.databinding.observable.list.ObservableList.fireListChange(ObservableList.java:73)
> at
> org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList.access$1(DetailObservableList.java:1)
> at
> org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList$1.handleListChange(DetailObservableList.java:48)
> at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
> at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
> at org.eclipse.core.databinding.observable.ChangeSupport.fireEvent(ChangeSupport.java:39)
> at org.eclipse.core.databinding.observable.list.AbstractObservableList.fireListChange(AbstractObservableList.java:117)
> at
> org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.notifyIfChanged(SimplePropertyObservableList.java:567)
> at
> org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.access$3(SimplePropertyObservableList.java:559)
> at
> org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$2.run(SimplePropertyObservableList.java:78)
> at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:148)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:152)
> at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:170)
> at
> org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$1.handleEvent(SimplePropertyObservableList.java:74)
> at
> org.eclipse.emf.databinding.internal.EMFPropertyListener$EMFListPropertyListener.notifyChanged(EMFPropertyListener.java:165)
> at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
> at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:98)
> at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:86)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.handleRollback(CDOTransactionImpl.java:1604)
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.rollback(CDOSingleTransactionStrategyImpl.java:115)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.rollback(CDOTransactionImpl.java:1230)
>
>
>
> To me this seems to be a bug in the contains method of the DelegatingEcoreEList (I use ecore version
> 2.9.0.v20130528-0742).
>
> Does anyone know how to fix this?
>
> Greetings
> Martin
>
>
Re: CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEL [message #1235101 is a reply to message #1234747] Thu, 23 January 2014 10:27 Go to previous message
Eclipse UserFriend
Hi Eike,

I created a bugzilla bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=426463. There is a test case attached to it.

Greetings
Martin
Previous Topic:[CDO] Procedure for shutting down CDO when running in Tomcat
Next Topic:remove delete problems
Goto Forum:
  


Current Time: Wed Jul 23 21:20:24 EDT 2025

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

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

Back to the top