Unable to open workspace and project

Hello,
I’m having trouble reopening a Capella project I worked very hard on the past month.
The software abruptly crashed and I am now unable to reopen my usual workspace. I tried to launch my project on a new workspace only to have an “Unknwon unloading error”.
Here are the details of the log I get:

eclipse.buildId=unknown
java.version=14.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Command-line arguments: -os win32 -ws win32 -arch x86_64

org.polarsys.capella.core.preferences
Error
Tue Aug 30 11:29:00 CEST 2022
Unknown loading error.

java.lang.RuntimeException: java.lang.NullPointerException
at org.polarsys.capella.core.platform.sirius.ui.session.CapellaSessionHelper.handleLoadingErrors(CapellaSessionHelper.java:360)
at org.polarsys.capella.core.platform.sirius.ui.session.CapellaSessionHelper.reportException(CapellaSessionHelper.java:287)
at org.polarsys.capella.core.sirius.ui.actions.OpenSessionAction.doOpenSessions(OpenSessionAction.java:166)
at org.polarsys.capella.core.sirius.ui.actions.OpenSessionAction$1.run(OpenSessionAction.java:226)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.NullPointerException
at java.base/java.nio.file.Path.of(Path.java:197)
at java.base/java.nio.file.Paths.get(Paths.java:98)
at org.polarsys.capella.core.platform.sirius.ui.session.GitConflictHelper.hasConflict(GitConflictHelper.java:162)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1694)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.polarsys.capella.core.platform.sirius.ui.session.GitConflictHelper.getFiles(GitConflictHelper.java:238)
at org.polarsys.capella.core.platform.sirius.ui.session.GitConflictHelper.getFilesInConflict(GitConflictHelper.java:246)
at org.polarsys.capella.core.platform.sirius.ui.session.GitConflictHelper.checkConflictFiles(GitConflictHelper.java:209)
at org.polarsys.capella.core.sirius.ui.actions.OpenSessionAction.doOpenSessions(OpenSessionAction.java:125)
… 2 more

Is there anyway that I can recover my project?
Thanks,

Hello,
I don’t know if reverting your installation to a date from the past could help, using the menu Help > About Capella > Installation Details >

Before doing that, you could try to create a fresh new Capella installation and copy your project in it and try to open it to see how it goes.

Before doing anything, you might want to wait for an answer from an official Capella Staff, they might find a better solution (I wonder if your problem has anything to do with Git somehow)
Good luck

Maybe doing a model repair would help?

Hello,

Thank you for the replies.
I tried both suggestions but to no avail unfortunately.

I got the same result when reverting to a previous installation.

The repair failed and a I got a similar Error (NullPointerException).

Maybe another option could be to look into your local history for your model and see if you have anything there. You should be able to access it by right clicking on your model files.

I couldn’t compare with local history because nothing was found for my project. Then I opened the History View and all I got was this version which gave an Error.

Then I guess the next step would be to open your model with a text editor and see what’s in there and try to figure out how to fix this directly in the file. Hard to tell from here.

1 Like

Hello all,

I deleted and reimported my project which, for a brief period of time, unwittingly fixed my problem after a day or two. I was still encountering other issues though. I tried sharing the project to colleagues by exporting it but it was impossible to open it on another workspace (java.lang.NullPointerException error).

Then just recently, I have had trouble opening the project on my own computer with the NullPointerError. I had created a few new diagrams and changed the name of the project. We were able to salvage objects and move them to another project by copy-pasting from the .capella file. Diagrams, notes are gone. Is it possible to recover the diagrams directly from the .aird? Are there any ways I could troubleshoot my project?

Hello,
A professional from the Capella Team could probably provide you a better answer,
If I had your problem and I had absolutely to try to get the diagrams back or the notes. I would do the following:

  1. Create a fresh Capella project, with random diagrams and one or 2 notes.
  2. download a text editor
  3. Open your original projectName.aird and projectname.capella (or .melodymodeller)
  4. Open the same items from your “new” capella projects.

You should have 4 tabs with:
(Your New Project AIRD - Your New Project CAPELLA - Your original AIRD - Your Original CAPELLA/Melodymodeller)

you can now inspect the “XML” code describing your projects, for instance notes such as this one:
image

Are coded like this:

If you are searching for the contents of your notes, then they are going to be inside the “description” value.

You can identify them with “notation::Shape” I believe.

Note that this snippet of code is positioned in the 50000th line…, it’s a big code, you are going to have to “search” a bit, but it’s doable.
__
If you look again at the screenshot you will notice some coordinates, that could be used to tell you how the note was positioned in the diagram.
That itself cannot be useful, unless you identified the placement of other elements.
That itself is not easy, but it could be done, I think you need to search for the name of the element (if you still had it in mind), find its code, then use the “IDs” to be able to find ANOTHER CODE that contains the coordinates of said element, thus you will be able to compare their positions.

You could theoretically restore the positions of every element, with enough effort and searching, and get an idea of the configuration of your diagrams.
For instance, here are the coordinates of the green function below the note forum5:

I don’t know if this can be useful or can be used, the X coordinate values for both elements (Forum5 and the function) should not be that apart, I might be missing something.

As you can see it can get very complicated, even more if you have the same element represented in many diagrams?
__
So Why did I ask you to open aswell a new project?
The theory, and this is just a theory, would be to taka parts of your code (original corrupted file) and paste it inside the xml code of your new project files.
For example, you could copy the notes codes, and see what happens.
I asked you to make a random diagram and a random note, in order to be able to locate the code zone where notes are placed, you will paste them there.

More in the theory, you could even copy other elements:

  • your diagrams, your components, you functions… your exchanges…, not juste the value of your notes.
    It is difficult to do this particular thing, because every element has many definitions in the code I noticed, you have a graphical definition (typically at the beginning of the code) and then you have normal definition.
    Even more complicated, every element is described in .capella/Melody and in .aird at the same time (different definitions).

I hope that can be of some help.


You could also probably contact Capella for some official Support via their business contacts. Maybe they could hasten the process for you.
Good luck

Hello,

Thank you for the extensive answer. Yes indeed going through the .aird file is no simple task.

We were able to launch the project by removing this line that made reference to another project – hopefully we won’t loose any information:

No problem,
So ultimately checking the Aird file and made it possible ultimately to restore your lost project?

Out of curiosity how many lines of xml did it contain.

Good luck then, hopefully no information is lost.

Yes, absolutely.
The .aird file is VERY long (over 51 million lines).

1 Like