Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » IllegalArgumentException: Can only deactivate the active transaction(Exception thrown when altering a model using Sirius tooling)
icon5.gif  IllegalArgumentException: Can only deactivate the active transaction [message #1690468] Fri, 27 March 2015 12:59 Go to next message
Sebastian Lehrig is currently offline Sebastian LehrigFriend
Messages: 16
Registered: July 2012
Junior Member
Hello,

when I try to alter my model using the Sirius tooling, an "IllegalArgumentException: Can only deactivate the active transaction" is thrown (detailed stack trace & environment details below). For example, this happens if I try to add a new class to my domain model. The change is neither shown in the editor nor serialized to the ecore file.

Any ideas on this issue?

Thanks
Sebastian

--------------

My Project:
Source here

I just converted my non-modelling project (already including a *.aird file) into a modelling project. My *.aird file is within a "model" subfolder that also includes my domain model. My domain model also references several other models from external plugins.

Environment:
OS X Yosemite, Version 10.10.2

Eclipse Modeling Tools
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600

Sirius 1.0.2.201501270932

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)


Session Data:
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.modeling.product -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.modeling.product 


Stacktrace:
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:75)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:57)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
	at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
	at org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:269)
	at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:189)
	at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
	at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4199)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalArgumentException: Can only deactivate the active transaction
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:533)
	at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
	at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
	at org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
	... 41 more

[Updated on: Fri, 27 March 2015 13:17]

Report message to a moderator

Re: IllegalArgumentException: Can only deactivate the active transaction [message #1690702 is a reply to message #1690468] Mon, 30 March 2015 16:46 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

Are you modifying the semantic model using a tool provided by Sirius,
like a node creation tool? or is it through some custom code?
If it is with custom code, are you executing it as a RecordingCommand in
the context of the transactional editing domain of the Sirius session?

Regards,
Steve

Le 27/03/2015 13:59, Sebastian Lehrig a écrit :
> Hello,
>
> when I try to alter my model using the Sirius tooling, an
> "IllegalArgumentException: Can only deactivate the active transaction"
> is thrown (detailed stack trace & environment details below). For
> example, this happens if I try to add a new class to my domain model.
> The change is neither shown in the editor nor serialized to the ecore file.
>
> Any ideas on this issue?
>
> Thanks
> Sebastian
>
> --------------
>
> My Project:
> I just converted my non-modelling project (already including a *.aird
> file) into a modelling project. My *.aird file is within a "model"
> subfolder that also includes my domain model. My domain model also
> references several other models from external plugins.
>
> Environment:
>
> OS X Yosemite, Version 10.10.2
>
> Eclipse Modeling Tools
> Version: Luna Service Release 2 (4.4.2)
> Build id: 20150219-0600
>
> java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>
>
> Session Data:
>
> eclipse.buildId=4.4.2.M20150204-1700
> java.version=1.8.0_25
> java.vendor=Oracle Corporation
> BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
> Framework arguments: -product org.eclipse.epp.package.modeling.product
> -keyring /Users/lehrig/.eclipse_keyring -showlocation
> Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product
> org.eclipse.epp.package.modeling.product
>
> Stacktrace:
>
> org.eclipse.core.commands.ExecutionException: While executing the
> operation, an exception occurred
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:75)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:57)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
>
> at
> org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
> at
> org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
>
> at
> org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:269)
> at
> org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:189)
> at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
> at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
> at
> org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
>
> at
> org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4199)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> Caused by: java.lang.IllegalArgumentException: Can only deactivate the
> active transaction
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:533)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
>
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
>
> at
> org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
>
> at
> org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
>
> at
> org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
>
> at
> org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
>
> at
> org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
>
> at
> org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
>
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
>
> ... 41 more
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: IllegalArgumentException: Can only deactivate the active transaction [message #1690704 is a reply to message #1690468] Mon, 30 March 2015 16:59 Go to previous messageGo to next message
Sebastian Lehrig is currently offline Sebastian LehrigFriend
Messages: 16
Registered: July 2012
Junior Member
I'm using the Sirius-based Ecore Tools editor (projects.eclipse.org/projects/modeling.emft.ecoretools/releases/2.0.0). What I tried, was simply to use the "Class" element from the palette to add a new class to my model.
Re: IllegalArgumentException: Can only deactivate the active transaction [message #1690783 is a reply to message #1690704] Tue, 31 March 2015 09:10 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

I tried to reproduce your issue with Ecore Tools 2.0.0 but had no
exception when I added a new Class on the diagram.
Your problem must be related to Ecore Tools rather than Sirius so I
recommend you to ask on the Ecore Tools forum
(https://eclipse.org/forums/index.php/f/165/) how to fix it.

Regards,
Steve

Le 30/03/2015 20:02, Sebastian Lehrig a écrit :
> I'm using the Sirius-based Ecore Tools editor
> (projects.eclipse.org/projects/modeling.emft.ecoretools/releases/2.0.0).
> What I tried, was simply to use the "Class" element from the palette to
> add a new class to my model.


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: IllegalArgumentException: Can only deactivate the active transaction [message #1690840 is a reply to message #1690783] Tue, 31 March 2015 14:44 Go to previous message
Sebastian Lehrig is currently offline Sebastian LehrigFriend
Messages: 16
Registered: July 2012
Junior Member
Thanks, discussion now continues here: https://www.eclipse.org/forums/index.php/t/1065288/
Previous Topic:About sample model example.basicfamily
Next Topic:Copy/Paste across diagrams
Goto Forum:
  


Current Time: Thu Apr 18 12:54:18 GMT 2024

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

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

Back to the top