Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Exception running Moka example
Exception running Moka example [message #1744051] Wed, 21 September 2016 18:52 Go to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
First off, a big "Thank you" to Géry Deloge et al for the tutorial (https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution)

I was following along but I got a Java NullPointerException when pressing debug in the "Starting an execution with a launch configuration" section.
I have attached an image of the event details.
index.php/fa/27160/0/

I noticed one difference from the tutorial and that is that the New_Configuration window has an extra field. I have also attached an image of that window.
index.php/fa/27159/0/
Re: Exception running Moka example [message #1744111 is a reply to message #1744051] Thu, 22 September 2016 12:08 Go to previous messageGo to next message
Jeremie Tatibouet is currently offline Jeremie TatibouetFriend
Messages: 10
Registered: April 2014
Junior Member
Hi Stephen -

In order to make the example to run it is required that you specify the execution engine used to perform the actual interpretation

In your case you can either use oep.moka.fuml or oep.moka.composites which are respectively implementations of Foundational UML and Composite Structures semantics.

In addition, the element to be executed must be the Increment_Factory behavior that is generated for the Increment class. The process to generate this behavior is:


  1. Right click on the Increment class
  2. Select Moka Menu
  3. Select modeling utils
  4. Click on generate factory


After these small adjustments you should be able to run the example. If not feel free to contact us.

Bests

Jérémie
Re: Exception running Moka example [message #1744117 is a reply to message #1744111] Thu, 22 September 2016 13:17 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
Jérémie,

I had already done this - in the "Your first executable model" section of your tutorial but I did it again for good measure.
I got the same exception as before.

Let me know if there are any other checks I can run to help debug this.

Thanks,
Steve
Re: Exception running Moka example [message #1744319 is a reply to message #1744117] Sun, 25 September 2016 06:58 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hmm, this looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=471564 which I closed because I couldn't reproduce it using a later version.
Re: Exception running Moka example [message #1744402 is a reply to message #1744319] Mon, 26 September 2016 14:21 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
It does.

I would guess that the tutorial is missing a step that changes a preference or an environment variable that is a default on your machine.
Let me know if I can help.
Re: Exception running Moka example [message #1744723 is a reply to message #1744402] Thu, 29 September 2016 16:31 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
Klaas, Jérémie,

So where do we go from here?
Is anyone looking in to this? Do you want me to re-open the old bug? Write a new one?

Or am I just stuck with Moka being inop. for me and I should just drop it?

Thanks,
Steve
Re: Exception running Moka example [message #1744819 is a reply to message #1744051] Fri, 30 September 2016 13:52 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
I ran a "Check for Updates" this morning (Sep 30, 9:30am EDT) and got this Moka error:

index.php/fa/27265/0/

Is this related to this issue?

Steve
Re: Exception running Moka example [message #1744820 is a reply to message #1744051] Fri, 30 September 2016 13:53 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
I ran a "Check for Updates" this morning (Sep 30, 9:30am EDT) and got this Moka error:

index.php/fa/27265/0/

Is this related to this issue?

Steve
Re: Exception running Moka example [message #1744858 is a reply to message #1744820] Fri, 30 September 2016 20:26 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

I tried to reproduce the above issue, but ran into https://bugs.eclipse.org/bugs/show_bug.cgi?id=502968

2b continued...

Klaas
Re: Exception running Moka example [message #1744859 is a reply to message #1744820] Fri, 30 September 2016 20:27 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

I tried to reproduce the above issue, but ran into https://bugs.eclipse.org/bugs/show_bug.cgi?id=502968

2b continued...

Klaas
Re: Exception running Moka example [message #1744950 is a reply to message #1744051] Mon, 03 October 2016 09:29 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi Stephen,

Meanwhile Benoit fixed the bug, and I found the cause of your problem.
In the screenshot below, you forgot to set (actually modify) the 'element to be executed' to the generated factory, iso. the classifierbehaviour.

Still, it is at least very 'user-unfriendly' to generate an un-understandable exception if the wrong element is selected, especially since the field is filled by default, so I'll re-open the bug.

HTH,

Klaas

Stephen Blackwell wrote on Wed, 21 September 2016 14:52
First off, a big "Thank you" to Géry Deloge et al for the tutorial (https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution)

I was following along but I got a Java NullPointerException when pressing debug in the "Starting an execution with a launch configuration" section.
I have attached an image of the event details.
index.php/fa/27160/0/

I noticed one difference from the tutorial and that is that the New_Configuration window has an extra field. I have also attached an image of that window.
index.php/fa/27159/0/

Re: Exception running Moka example [message #1744979 is a reply to message #1744950] Mon, 03 October 2016 17:40 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
Hi Klaas,

OK, that was the problem. The animation is working now.
I hope I'm not being rude here but I would be happy to help with the wording in the example. I guessing that English is not Jérémie's first language.

I curious about the order of the animation, specifically on the incrementMethod activity diagram. What I see is this:

First the "This" node animates, then the output pin, the control flow and the fork node.
Next the control flow to the "read counter" input pin then the "read counter" node, the "read counter" output pin and control flow to the "add" x input pin.
After that is the control flow from the fork to the "set counter" object input pin.
Then the "1" node, the "1" output pin.
etc, etc

I would have though that the "This" and the "1" node would have animated at the same time followed by their respective output nodes at the same time and then the output flows etc, etc.

So how is the animation ordering determined?

Thanks,
Steve
Re: Exception running Moka example [message #1746913 is a reply to message #1744979] Mon, 07 November 2016 16:00 Go to previous messageGo to next message
Bruno Costa is currently offline Bruno CostaFriend
Messages: 15
Registered: November 2014
Junior Member
Dear guys,

I had the same problem, but with the help of this thread I could solve them Smile

However, I still can't see the variables in the variables panel. Could you guys see the variables and value of the count property change?

Re: Exception running Moka example [message #1747996 is a reply to message #1746913] Thu, 17 November 2016 14:20 Go to previous messageGo to next message
Arnaud Cuccuru is currently offline Arnaud CuccuruFriend
Messages: 34
Registered: April 2010
Member
Hi Bruno,

To see the variables in the panel, the execution has to be suspended. This can be done by pressing the "pause" button, or by putting a breakpoint on a node or vertex in the activity.

Arnaud
Re: Exception running Moka example [message #1748073 is a reply to message #1744979] Fri, 18 November 2016 10:46 Go to previous message
Arnaud Cuccuru is currently offline Arnaud CuccuruFriend
Messages: 34
Registered: April 2010
Member
Hi Stephen,

The ordering of animation follows the order in which nodes are executed by the execution engine. And the execution engine complies with the fUML specification. So, the execution order that you see with the animation is legal.

Arnaud

[Updated on: Fri, 18 November 2016 11:36]

Report message to a moderator

Previous Topic:Editing the values of a composite association from Stereotype to class
Next Topic:Expressions and MOKA
Goto Forum:
  


Current Time: Fri Mar 29 05:49:13 GMT 2024

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

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

Back to the top