Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Deleting objects
Deleting objects [message #116454] Tue, 01 April 2008 07:15 Go to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

when I delete an object in my gmf editor and later save the objects of the
model the following exception is thrown:
org.eclipse.emf.teneo.StoreValidationException: Diagnosis of
de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}
The required feature 'prozess' of
'de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}'
must be set
at
org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:409)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:347)
at
de.edvchl.clic.workflow.diagram.part.WorkflowDocumentProvide r$2.doExecute(WorkflowDocumentProvider.java:439)
at
org.eclipse.emf.transaction.RecordingCommand.execute(Recordi ngCommand.java:130)
at
org.eclipse.emf.common.command.BasicCommandStack.execute(Bas icCommandStack.java:92)

The exception is ignored and the database delete is done later when I
close the application.
The exception diagnosis is right; the process is the container for the
activitaet, but I deleted the activitaet, so activitaet should not be
considered to be stored. At the moment of the delete there is no session
available to do a session.delete() on the object.
Do you have any idea how to handle this situation right?

gr. Manfred
Re: Deleting objects [message #116462 is a reply to message #116454] Tue, 01 April 2008 07:22 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Which version of Teneo are you using? I had this exception two weeks back and afaik I solved it in
the builds from 19 March onwards.

The cause was that the deleted object was still present in the modified/inserted objects list in the
resource. So the validation picked it up which was wrong.
You can debug into the validateContents to check if the bug I encountered still occurs.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> when I delete an object in my gmf editor and later save the objects of
> the model the following exception is thrown:
> org.eclipse.emf.teneo.StoreValidationException: Diagnosis of
> de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}
>
> The required feature 'prozess' of
> 'de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}'
> must be set
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:409)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:347)
> at
> de.edvchl.clic.workflow.diagram.part.WorkflowDocumentProvide r$2.doExecute(WorkflowDocumentProvider.java:439)
>
> at
> org.eclipse.emf.transaction.RecordingCommand.execute(Recordi ngCommand.java:130)
>
> at
> org.eclipse.emf.common.command.BasicCommandStack.execute(Bas icCommandStack.java:92)
>
>
> The exception is ignored and the database delete is done later when I
> close the application.
> The exception diagnosis is right; the process is the container for the
> activitaet, but I deleted the activitaet, so activitaet should not be
> considered to be stored. At the moment of the delete there is no session
> available to do a session.delete() on the object.
> Do you have any idea how to handle this situation right?
>
> gr. Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: Deleting objects [message #116475 is a reply to message #116462] Tue, 01 April 2008 08:39 Go to previous messageGo to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

I am working with the newest teneo version I200803310559.

I've debugged the validateContents() and the StoreResource and found some
strange things:
1. in validateContents() the object I deleted is found in the
newObjects-list - but it was loaded from the database
2. during the loading process the object is attached to the container
after the StoreResource.load() is in the finally block and so
isLoading=false

I add a stack that shows the situation when StoreResource.addedEObject()
is called during the StoreResource.load() with the eNotify method. Perhaps
the isLoading=false is too early?

gr. Manfred

HibernateResource(StoreResource).addedEObject(EObject) line: 491
HibernateResource(StoreResource).attachedHelper(EObject) line: 572
HibernateResource(StoreResource).attached(EObject) line: 523
AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject, int,
NotificationChain) line: 1316
AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
NotificationChain) line: 176
AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
NotificationChain) line: 224
AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
NotificationChain) line: 250
AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
Class<?>, NotificationChain) line: 1389
EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
line: 129
EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
line: 337
SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
Object[], EntityMode) line: 3566
TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
PreLoadEvent, PostLoadEvent) line: 129
OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
SessionImplementor, boolean) line: 854
OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
boolean) line: 729
OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
QueryParameters, boolean) line: 236
OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
Type) line: 1994
OneToManyLoader(CollectionLoader).initialize(Serializable,
SessionImplementor) line: 36
OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
SessionImplementor) line: 565
EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
line: 60
EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
line: 61
SessionImpl.initializeCollection(PersistentCollection, boolean) line: 1716
PersistentList(AbstractPersistentCollection).initialize(bool ean) line: 344
PersistentList(AbstractPersistentCollection).read() line: 86
PersistentList.toArray() line: 123
HibernatePersistableEList<E>.doLoad() line: 137
HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty() line: 376
HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
ProzessImpl.eIsSet(int) line: 334
ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
TransactionChangeRecorder.setTarget(Notifier) line: 145
BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
line: 266
TransactionChangeRecorder.notifyChanged(Notification) line: 206
HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
HibernateResource(StoreResource).load(Map<?,?>) line: 301
Re: Deleting objects [message #116481 is a reply to message #116475] Tue, 01 April 2008 09:08 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
I can see that the TransactionChangeRecorder also loads unloaded lists by doing isEmpty. So it
results in eager fetching of all containment data.

So afaics your remark is correct that the isLoading = false should happen later. Also because I did
not think about containment many-to-one proxies which can be resolved in the finally block.

However, even when the object is loaded in the finally block (and put in the newobjects list) then
the delete action should remove it from the newObjects (see the StoreResource.removedEObject
method), can you check if the object is present in the newEObjectSet?

Regarding the transactionchangerecorder reading all objects, is this fine in your case? Maybe all
contained data needs to be read anyway to display all the information in the gmf diagram.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I am working with the newest teneo version I200803310559.
>
> I've debugged the validateContents() and the StoreResource and found
> some strange things:
> 1. in validateContents() the object I deleted is found in the
> newObjects-list - but it was loaded from the database
> 2. during the loading process the object is attached to the container
> after the StoreResource.load() is in the finally block and so
> isLoading=false
>
> I add a stack that shows the situation when StoreResource.addedEObject()
> is called during the StoreResource.load() with the eNotify method.
> Perhaps the isLoading=false is too early?
>
> gr. Manfred
>
> HibernateResource(StoreResource).addedEObject(EObject) line: 491
> HibernateResource(StoreResource).attachedHelper(EObject) line: 572
> HibernateResource(StoreResource).attached(EObject) line: 523
> AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject,
> int, NotificationChain) line: 1316
> AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
> NotificationChain) line: 176
> AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
> NotificationChain) line: 224
> AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
> NotificationChain) line: 250
> AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
> Class<?>, NotificationChain) line: 1389
> EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
> line: 129
> EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
> line: 337
> SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
> Object[], EntityMode) line: 3566
> TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
> PreLoadEvent, PostLoadEvent) line: 129
> OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
> SessionImplementor, boolean) line: 854
> OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
> boolean) line: 729
> OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
> QueryParameters, boolean) line: 236
> OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
> Type) line: 1994
> OneToManyLoader(CollectionLoader).initialize(Serializable,
> SessionImplementor) line: 36
> OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
> SessionImplementor) line: 565
> EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
> line: 60
> EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
> line: 61
> SessionImpl.initializeCollection(PersistentCollection, boolean) line:
> 1716
> PersistentList(AbstractPersistentCollection).initialize(bool ean) line:
> 344
> PersistentList(AbstractPersistentCollection).read() line: 86
> PersistentList.toArray() line: 123
> HibernatePersistableEList<E>.doLoad() line: 137
> HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
> HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty()
> line: 376
> HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
> ProzessImpl.eIsSet(int) line: 334
> ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
> EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
> TransactionChangeRecorder.setTarget(Notifier) line: 145
> BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
> BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
> TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
> TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
> line: 266
> TransactionChangeRecorder.notifyChanged(Notification) line: 206
> HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
> HibernateResource(StoreResource).load(Map<?,?>) line: 301
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: Deleting objects [message #116486 is a reply to message #116481] Tue, 01 April 2008 10:09 Go to previous messageGo to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

I've debugged removedEObject() and found the following line
assert (newEObjects.remove(eObject)); // just remove from this list
I assume that asserts are disabled. The remove is NOT called!

I will enter a bugzilla for this.

The eager fetching is not intended but perhaps necessary for gmf ?!?

Gr. Manfred
Re: Deleting objects [message #116493 is a reply to message #116486] Tue, 01 April 2008 10:16 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I should have thought about disabled assertions there...

Yes can you enter a bugzilla for this one?
Can you also mention moving the isLoading = false to the end of the finally block?

I think the eager fetching is required for gmf anyway, as gmf will display various parts of the
model resulting in loading of most of the object tree (at least the part that is displayed).

On the other hand it would be nice if the transactionchangerecorder would work with a nonloading
content provider. But that's a future topic I guess. I will enter a bugzilla for that.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I've debugged removedEObject() and found the following line
> assert (newEObjects.remove(eObject)); // just remove from this list
> I assume that asserts are disabled. The remove is NOT called!
>
> I will enter a bugzilla for this.
>
> The eager fetching is not intended but perhaps necessary for gmf ?!?
> Gr. Manfred
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: Deleting objects [message #616042 is a reply to message #116454] Tue, 01 April 2008 07:22 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Which version of Teneo are you using? I had this exception two weeks back and afaik I solved it in
the builds from 19 March onwards.

The cause was that the deleted object was still present in the modified/inserted objects list in the
resource. So the validation picked it up which was wrong.
You can debug into the validateContents to check if the bug I encountered still occurs.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> when I delete an object in my gmf editor and later save the objects of
> the model the following exception is thrown:
> org.eclipse.emf.teneo.StoreValidationException: Diagnosis of
> de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}
>
> The required feature 'prozess' of
> 'de.edvchl.clic.workflow.impl.AktivitaetImpl@5043d6{#ff80808119050fff01190510ede20003}'
> must be set
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:409)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:347)
> at
> de.edvchl.clic.workflow.diagram.part.WorkflowDocumentProvide r$2.doExecute(WorkflowDocumentProvider.java:439)
>
> at
> org.eclipse.emf.transaction.RecordingCommand.execute(Recordi ngCommand.java:130)
>
> at
> org.eclipse.emf.common.command.BasicCommandStack.execute(Bas icCommandStack.java:92)
>
>
> The exception is ignored and the database delete is done later when I
> close the application.
> The exception diagnosis is right; the process is the container for the
> activitaet, but I deleted the activitaet, so activitaet should not be
> considered to be stored. At the moment of the delete there is no session
> available to do a session.delete() on the object.
> Do you have any idea how to handle this situation right?
>
> gr. Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: Deleting objects [message #616044 is a reply to message #116462] Tue, 01 April 2008 08:39 Go to previous message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

I am working with the newest teneo version I200803310559.

I've debugged the validateContents() and the StoreResource and found some
strange things:
1. in validateContents() the object I deleted is found in the
newObjects-list - but it was loaded from the database
2. during the loading process the object is attached to the container
after the StoreResource.load() is in the finally block and so
isLoading=false

I add a stack that shows the situation when StoreResource.addedEObject()
is called during the StoreResource.load() with the eNotify method. Perhaps
the isLoading=false is too early?

gr. Manfred

HibernateResource(StoreResource).addedEObject(EObject) line: 491
HibernateResource(StoreResource).attachedHelper(EObject) line: 572
HibernateResource(StoreResource).attached(EObject) line: 523
AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject, int,
NotificationChain) line: 1316
AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
NotificationChain) line: 176
AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
NotificationChain) line: 224
AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
NotificationChain) line: 250
AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
Class<?>, NotificationChain) line: 1389
EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
line: 129
EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
line: 337
SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
Object[], EntityMode) line: 3566
TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
PreLoadEvent, PostLoadEvent) line: 129
OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
SessionImplementor, boolean) line: 854
OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
boolean) line: 729
OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
QueryParameters, boolean) line: 236
OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
Type) line: 1994
OneToManyLoader(CollectionLoader).initialize(Serializable,
SessionImplementor) line: 36
OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
SessionImplementor) line: 565
EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
line: 60
EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
line: 61
SessionImpl.initializeCollection(PersistentCollection, boolean) line: 1716
PersistentList(AbstractPersistentCollection).initialize(bool ean) line: 344
PersistentList(AbstractPersistentCollection).read() line: 86
PersistentList.toArray() line: 123
HibernatePersistableEList<E>.doLoad() line: 137
HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty() line: 376
HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
ProzessImpl.eIsSet(int) line: 334
ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
TransactionChangeRecorder.setTarget(Notifier) line: 145
BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
line: 266
TransactionChangeRecorder.notifyChanged(Notification) line: 206
HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
HibernateResource(StoreResource).load(Map<?,?>) line: 301
Re: Deleting objects [message #616045 is a reply to message #116475] Tue, 01 April 2008 09:08 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
I can see that the TransactionChangeRecorder also loads unloaded lists by doing isEmpty. So it
results in eager fetching of all containment data.

So afaics your remark is correct that the isLoading = false should happen later. Also because I did
not think about containment many-to-one proxies which can be resolved in the finally block.

However, even when the object is loaded in the finally block (and put in the newobjects list) then
the delete action should remove it from the newObjects (see the StoreResource.removedEObject
method), can you check if the object is present in the newEObjectSet?

Regarding the transactionchangerecorder reading all objects, is this fine in your case? Maybe all
contained data needs to be read anyway to display all the information in the gmf diagram.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I am working with the newest teneo version I200803310559.
>
> I've debugged the validateContents() and the StoreResource and found
> some strange things:
> 1. in validateContents() the object I deleted is found in the
> newObjects-list - but it was loaded from the database
> 2. during the loading process the object is attached to the container
> after the StoreResource.load() is in the finally block and so
> isLoading=false
>
> I add a stack that shows the situation when StoreResource.addedEObject()
> is called during the StoreResource.load() with the eNotify method.
> Perhaps the isLoading=false is too early?
>
> gr. Manfred
>
> HibernateResource(StoreResource).addedEObject(EObject) line: 491
> HibernateResource(StoreResource).attachedHelper(EObject) line: 572
> HibernateResource(StoreResource).attached(EObject) line: 523
> AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject,
> int, NotificationChain) line: 1316
> AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
> NotificationChain) line: 176
> AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
> NotificationChain) line: 224
> AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
> NotificationChain) line: 250
> AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
> Class<?>, NotificationChain) line: 1389
> EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
> line: 129
> EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
> line: 337
> SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
> Object[], EntityMode) line: 3566
> TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
> PreLoadEvent, PostLoadEvent) line: 129
> OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
> SessionImplementor, boolean) line: 854
> OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
> boolean) line: 729
> OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
> QueryParameters, boolean) line: 236
> OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
> Type) line: 1994
> OneToManyLoader(CollectionLoader).initialize(Serializable,
> SessionImplementor) line: 36
> OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
> SessionImplementor) line: 565
> EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
> line: 60
> EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
> line: 61
> SessionImpl.initializeCollection(PersistentCollection, boolean) line:
> 1716
> PersistentList(AbstractPersistentCollection).initialize(bool ean) line:
> 344
> PersistentList(AbstractPersistentCollection).read() line: 86
> PersistentList.toArray() line: 123
> HibernatePersistableEList<E>.doLoad() line: 137
> HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
> HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty()
> line: 376
> HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
> ProzessImpl.eIsSet(int) line: 334
> ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
> EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
> TransactionChangeRecorder.setTarget(Notifier) line: 145
> BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
> BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
> TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
> TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
> line: 266
> TransactionChangeRecorder.notifyChanged(Notification) line: 206
> HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
> HibernateResource(StoreResource).load(Map<?,?>) line: 301
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: Deleting objects [message #616046 is a reply to message #116481] Tue, 01 April 2008 10:09 Go to previous message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

I've debugged removedEObject() and found the following line
assert (newEObjects.remove(eObject)); // just remove from this list
I assume that asserts are disabled. The remove is NOT called!

I will enter a bugzilla for this.

The eager fetching is not intended but perhaps necessary for gmf ?!?

Gr. Manfred
Re: Deleting objects [message #616047 is a reply to message #116486] Tue, 01 April 2008 10:16 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I should have thought about disabled assertions there...

Yes can you enter a bugzilla for this one?
Can you also mention moving the isLoading = false to the end of the finally block?

I think the eager fetching is required for gmf anyway, as gmf will display various parts of the
model resulting in loading of most of the object tree (at least the part that is displayed).

On the other hand it would be nice if the transactionchangerecorder would work with a nonloading
content provider. But that's a future topic I guess. I will enter a bugzilla for that.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I've debugged removedEObject() and found the following line
> assert (newEObjects.remove(eObject)); // just remove from this list
> I assume that asserts are disabled. The remove is NOT called!
>
> I will enter a bugzilla for this.
>
> The eager fetching is not intended but perhaps necessary for gmf ?!?
> Gr. Manfred
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:Deleting objects
Next Topic:[Teneo] org.hibernate.LazyInitializationException: illegal access to loading collection
Goto Forum:
  


Current Time: Thu Dec 26 23:07:11 GMT 2024

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

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

Back to the top