exclamation-circle [Solved] java.lang.NullPointerException if no 'Instanciated association' available

4 years 5 days ago #3425 by Barock

Version 3.3.1
Build: 201502191121
Metamodel: 9023
System: win32 (6.2)
Architecture: x86_64


Hallo friends,
this tool is great but a little bit unstable. I have got exceptions more times.

I add the file.

Open the 'Object diagram' under the package 'Objects'.
Make a click on the left link association from 'Instance1' to 'Instance'.
In the Element menu you should be able to select an Instanciated association, but there is only "null" available and if you choose this because there are no alternatives then a Nullpointer Exception occurs.

And I have a question. Why is there only "null" selectable?
In the 'Class diagram' you can see that the class 'InterfaceUsage' have got an association named "mAnyInterface" to the interface 'AnyInterface' and the class 'InterfaceRealisation' implements 'AnyInterface'.
So, if we have got an instance of 'InterfaceUsage' and 'InterfaceRealisation' there should be an Instanciated association named "mAnyInterface".

Best regards
Attachments:

Please Log in or Create an account to join the conversation.

4 years 2 days ago #3428 by pan
Hello Barock,

There is 2 problems: the null pointer exception and the fact that you cannot select the association that you have between AnyInterface and InterfaceUsage. You are right, you should be able to select the association.

These 2 problems will be fixed in the next version of Modelio.

BR

Please Log in or Create an account to join the conversation.

3 years 7 months ago #3655 by Barock
This issue was fixed in Modelio 3.4.0! Great job, thank you so much!

Please Log in or Create an account to join the conversation.

1 year 5 months ago #4776 by riyanmarge
NullPointerException in Java

NullPointerException is a RuntimeException . Runtime exceptions are critical and cannot be caught at compile time. They crash the program at run time if they are not handled properly. When a class is instantiated, its object is stored in computer memory. The NullPointerExceptions occur when you try to use a reference that points to no location in memory (null) as though it were referencing an object. These include:

Calling the instance method of a null object.
Accessing or modifying the field of a null object.
Throwing null as if it were a Throwable value.

Please Log in or Create an account to join the conversation.

1 year 5 months ago #4777 by pan
riyanmarge,

Please could you give us more information about the scenario leading to this NullPointerException?
Did you try to create an association?
What is your configuration?
How to submit a problem?

Please Log in or Create an account to join the conversation.

Moderators: tmaaabcdeebr
Time to create page: 0.038 seconds
^ Back to Top