Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » NullPointerExceptions in ControlledResourceTracker while rolling back transactions
NullPointerExceptions in ControlledResourceTracker while rolling back transactions [message #1770237] Wed, 09 August 2017 09:59 Go to next message
Marc-Florian Wendland is currently offline Marc-Florian WendlandFriend
Messages: 81
Registered: January 2013
Member
Hi all,

I have encountered an unexpected behavior of a Papyrus component (ControlledResourceTracker) while rolling back a transaction that executed a transformation. The transformation produced a UML PSM from a UML PIM that is contained in the very same ResourceSet as the PIM.

When an exception occurs during the execution of the transactional command (there are more steps than just creating the PSM, so happens that the PSM is correctly generated and even executed, but another steps in the transaction may cause the transaction to rollback) the transaction framework tries to rollback the transaction.

So far, so good. Unfortunately, the rollback aborts with a NullPointerException thrown by the ControlledResourceTracker. You can find the exception below. Does anyone else encountered this situation with the ControlledResourceTracker?

java.lang.reflect.InvocationTargetException
at de.fraunhofer.fokus.utest.papyrus.ui.handler.testdesign.ExecuteTestDesignDirective$1.run(ExecuteTestDesignDirective.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.lang.NullPointerException
at org.eclipse.papyrus.infra.emf.readonly.ControlledResourceTracker.handleRemove(ControlledResourceTracker.java:228)
at org.eclipse.papyrus.infra.emf.readonly.ControlledResourceTracker.notifyChanged(ControlledResourceTracker.java:303)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.dispatchNotification(NotifyingListImpl.java:261)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:713)
at org.eclipse.emf.common.util.ECollections.setEList(ECollections.java:238)
at org.eclipse.emf.ecore.change.impl.ResourceChangeImpl.process(ResourceChangeImpl.java:305)
at org.eclipse.emf.ecore.change.impl.ResourceChangeImpl.apply(ResourceChangeImpl.java:282)
at org.eclipse.emf.ecore.change.impl.ResourceChangeImpl.apply(ResourceChangeImpl.java:267)
at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.apply(ChangeDescriptionImpl.java:306)
at org.eclipse.emf.transaction.util.CompositeChangeDescription.apply(CompositeChangeDescription.java:135)
at org.eclipse.emf.transaction.impl.TransactionImpl.doRollback(TransactionImpl.java:570)
at org.eclipse.emf.transaction.impl.TransactionImpl.rollback(TransactionImpl.java:547)
at org.eclipse.emf.workspace.AbstractEMFOperation.rollback(AbstractEMFOperation.java:630)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:187)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:516)
at de.fraunhofer.fokus.utest.papyrus.ui.handler.testdesign.ExecuteTestDesignDirective$1.run(ExecuteTestDesignDirective.java:106)
... 1 more

Best regards,
Marc-Florian
Re: NullPointerExceptions in ControlledResourceTracker while rolling back transactions [message #1770366 is a reply to message #1770237] Thu, 10 August 2017 12:15 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1173
Registered: July 2009
Location: Canada
Senior Member

Hi, Marc-Florian,

This is pretty clearly a bug: the ControlledResourceTracker should be able to handle the case that the object in question is not in a resource, which the debugger here shows to be the case.

Would you mind reporting this in bugzilla?

Thanks,
Christian
Re: NullPointerExceptions in ControlledResourceTracker while rolling back transactions [message #1770368 is a reply to message #1770366] Thu, 10 August 2017 12:22 Go to previous messageGo to next message
Marc-Florian Wendland is currently offline Marc-Florian WendlandFriend
Messages: 81
Registered: January 2013
Member
Dear Christian,

thanks for the quick answer. I will file a bug, not a problem at all. I will come back and post the link to the filed bug later.

Best regards and thanks again,
Marc-Florian
Re: NullPointerExceptions in ControlledResourceTracker while rolling back transactions [message #1773459 is a reply to message #1770368] Thu, 28 September 2017 07:19 Go to previous message
Marc-Florian Wendland is currently offline Marc-Florian WendlandFriend
Messages: 81
Registered: January 2013
Member
Hi Christian,

I eventually filed a report against the bug concerning the ControlledResourceTracker. You can find it here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525297

Best regards,
Marc-Florian
Previous Topic:What is the proper use of "Restore Related Elements"
Next Topic:setting "do activity" in state machine diagram
Goto Forum:
  


Current Time: Thu Jul 19 22:59:04 GMT 2018

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

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

Back to the top