Error: Diagram with Orphaned Element

Started by Alberto, August 26, 2019, 21:14:07 PM

Previous topic - Next topic

Alberto

Something happened when I dropped an element on a view, I then got some Java error that made it unclickable anymore.  I tried to undo, nothing happened, closed and tried to open the view, got a NullPointerException, tried to save to a different file, I got this error.

I recently installed Herve's alpha version of the specialization tool, which I think caused the java to bug out, but I would like to be able to fix the archi model and not lose the work I did already, then deal with the plugin later.  Any ideas how to go under the hood of an open model to hunt and kill the 'rogue' element?


Phil Beauvoir

If you can remember the exact steps that led to the problem that would be useful to know. I'd be interested to know if it is an Archi issue or caused by the plug-in.

Do you have a *.bak file of the model?

If not, you can send it to me by email and I can fix it, assuming it's not confidential.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé

Hi Alberto,

If I understand correctly, you cannot save your model as you're experiencing the error message you sent.

Do you have the jArchi plugin installed ? We may use it to try to remove the "CCure / DSR (AS IS) (Servers) (copy)" from the view.

Best regards
Hervé

Phil Beauvoir

Hervé, it might be quicker for me to do surgery on the model...  8)
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Alberto

It's a repo file.  The bak and temp files are from my previous save.  It's also my main model so it does have some sensitive info on our security infrastructure.

I do have jArchi installed and I'm looking to see if I can identify it that way, but I'm no programmer so I'm still on the JS learning curve.  Could I delete the element from the view that way? At least I have the UUID

Alberto

I also have the database plugin installed... would that be easier?

Phil Beauvoir

#6
The error message means that a diagram object has been orphaned from the model structure somehow. A diagram object has a parent object which is the diagram itself ("View"), and this View has a Folder as a parent until it reaches the model itself:

Model
    Views Folder
         View (Diagram)
              Diagram Object

Somewhere that chain is broken. Did you make a copy of the View just before the error? Perhaps the View is orphaned. Or perhaps a sub-folder is orphaned.

Perhaps a folder was moved or renamed? There is a known issue to do with folders and the collaboration plug-in (I need to remind myself what causes it... JB knows)

I don't think you'll easily fix it with jArchi or db plugin.

As it's in a repo, is there a previous commits you could go back to?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Alberto

I used the database plugin to upload the model and found the object_id in the views_objects_in_view table.  I wonder if I can delete the row from the table  ??? I'm in the 'let's see what happens if I press this button' territory.

I don't see the uuid listed anywhere else so not sure if it uploaded the whole thing, my Archi client is a bit buggy right now so I don't trust it

I have the repo from this morning, so worse comes to worse I loose a day's worth of work... not terrible but that means a long night tonight as my mgr wants these for tomorrow.

Phil Beauvoir

There are so many variables at work here (collaboration plugin, db plugin, alpha specialization plugin) that I can't fix this at a distance. I can't advise on Herve's plugins, either.

If I were to look at the *.archimate file I could probably salvage it but that's an option that you can't pursue.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Alberto

Yes, I made a copy of the view, and I believe the uuid in the error is related to the copy.

I know, I got a few things going on, I've been using Archi quite extensively and honestly this is the first bug I encounter, so don't sweat it Phil. I'll blame it on Herve  ;D


Phil Beauvoir

I'm interested to know if there's any bug related to copying a view. BTW - what version of Archi is this?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Alberto


Phil Beauvoir

You can view the *.archimate file in a text editor and find the xml tag that has that ID and see if it has a parent xml tag. If it does then see if the parent has a parent...

<model>
   <"views" folder>
        <view>
             <diagram_object>
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Alberto

I found the Archi logs.  Attached for the curious but I think I'm calling it a day and start over tonight. 

Thanks Phil (and Herve)

Phil Beauvoir

#14
Actually, I just checked again. It's not the diagram object that is orphaned but the element that it references that is orphaned.

So you need to find the diagram object by its ID and then look for the archimateElement="ID" part and then find that element by its ID. If you can't find it then the diagram object tag needs to be deleted. But this can get complicated if this is attached to something else...

Note: the model checker checks the integrity of the model each time it is saved. If a problem is found, you are not allowed to save the model. This is intentional so that you don't save a model that has lost its integrity. So, if this ever happens, note the error message and quit Archi without saving the model. Restart and load the model again. Try to re-save after a modification. If there is still a problem, then the issue must have arisen somewhere else.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.