Repair/Migration Error

Hello everybody,
I am trying to repair/migrate my Capella project, but I am getting a null pointer exception error at the end of the repair. Anyone know how to fix that kind of error? I have linked the error log.

I am experiencing the same problem while trying to migrate a model to Capella 1.3.1 from 1.3.0. Neither Repair on Capella 1.3.0 nor Migration on Capella 1.3.1 are working.

Hi,
There is no way to migrate a model back from 1.3.1 to 1.3.0, sorry.

I am trying to migrate to 1.3.1 not back to 1.3.0, but migration fails because of null pointer exception. The original 1.3.0 repair fails too.

Hi,
do you read the Capella migration process ?
Capella Guide > User Manual > First steps with Capella , How to Migrate Capella Project
It is recommended first to backup the original model (Git for instance), then, upgrade your installation (Capella, addons and viewpoints), clean configuration/workspace and run Capella Project Migration action.
Sirius “Repair” action is not recommended and required normally.
Can you share us the model in Capella 1.3.0, obfuscated if you want.
Best regards,
Michel

Can you also send your error log as it seems that the original issue from 2017 has been fixed.
Thanks

Please find below the error log of the repair process:
java.lang.NullPointerException
at org.eclipse.sirius.business.api.session.danalysis.DAnalysisS essionHelper.updateModelsReferences(DAnalysisSessionHelper.j ava:354)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.i nformModel(SiriusRepairProcess.java:433)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.h andleView(SiriusRepairProcess.java:569)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.a ccess$0(SiriusRepairProcess.java:566)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess$2 .execute(SiriusRepairProcess.java:320)
at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFC ommandOperation.java:119)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:488)
at org.polarsys.capella.common.ef.internal.command.WorkspaceCom mandStackImpl.doExecute(WorkspaceCommandStackImpl.java:148)
at org.polarsys.capella.common.platform.sirius.ted.SemanticEdit ingDomainFactory$SemanticCommandStack.doExecute(SemanticEdit ingDomainFactory.java:276)
at org.eclipse.emf.transaction.impl.AbstractTransactionalComman dStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.sirius.business.internal.migration.resource.sess ion.commands.MigrationCommandExecutor.execute(MigrationComma ndExecutor.java:58)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.r epairModel(SiriusRepairProcess.java:332)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.r epair(SiriusRepairProcess.java:197)
at org.eclipse.sirius.business.api.repair.SiriusRepairProcess.r un(SiriusRepairProcess.java:142)
at org.eclipse.sirius.ui.tools.internal.actions.repair.Represen tationFilesRepairAction$1.repair(RepresentationFilesRepairAc tion.java:86)
at org.eclipse.sirius.ui.tools.internal.actions.repair.Represen tationFilesRepairAction$1.run(RepresentationFilesRepairActio n.java:70)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:119)
The migration in Capella 1.3.1 generates this exception:
java.lang.NullPointerException
at org.polarsys.capella.core.diagram.helpers.DAnnotationHelper. getAnnotation(DAnnotationHelper.java:44)
at org.polarsys.capella.vp.requirements.ui.migration.Requiremen tMigrationContribution.migrateAllocations(RequirementMigrati onContribution.java:54)
at org.polarsys.capella.vp.requirements.ui.migration.Requiremen tMigrationContribution.unaryMigrationExecute(RequirementMigr ationContribution.java:42)
at org.polarsys.capella.core.data.migration.MigrationHelpers.po stMigrationExecute(MigrationHelpers.java:234)
at org.polarsys.capella.core.data.migration.ContributoryMigrati onRunnable.postMigrationExecute(ContributoryMigrationRunnabl e.java:52)
at org.polarsys.capella.core.data.migration.MigrationRunnable$3 .run(MigrationRunnable.java:342)
at org.polarsys.capella.common.ef.ExecutionManager$2.doExecute( ExecutionManager.java:127)
at org.eclipse.emf.transaction.RecordingCommand.execute(Recordi ngCommand.java:135)
at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFC ommandOperation.java:119)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:150)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:488)
at org.polarsys.capella.common.ef.internal.command.WorkspaceCom mandStackImpl.doExecute(WorkspaceCommandStackImpl.java:148)
at org.polarsys.capella.common.platform.sirius.ted.SemanticEdit ingDomainFactory$SemanticCommandStack.doExecute(SemanticEdit ingDomainFactory.java:276)
at org.eclipse.emf.transaction.impl.AbstractTransactionalComman dStack.execute(AbstractTransactionalCommandStack.java:165)
at org.polarsys.capella.common.ef.ExecutionManager.executeReadW riteCommand(ExecutionManager.java:91)
at org.polarsys.capella.common.ef.ExecutionManager.execute(Exec utionManager.java:66)
at org.polarsys.capella.core.data.migration.MigrationRunnable.p erformPostMigrationExecute(MigrationRunnable.java:328)
at org.polarsys.capella.core.data.migration.MigrationRunnable.r un(MigrationRunnable.java:131)
at org.polarsys.capella.core.data.migration.MigrationJob.runInW orkspace(MigrationJob.java:55)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Hi,
Indeed there is an issue here.
In your model it seems that you have a “lost” diagram which lead to migration failure with requirement addon installed.
A lost diagram is a diagram that can no longer being opened as its semantic owner has been deleted or has been deleted somehow by another user.
Lost diagram in 1.3.1
In capella 1.3.1, those diagrams appear as gray, but in 1.3.0 there is no indication for them.
We will look to deliver a new version of requirement addon to avoid this issue,
To succeed migration to capella 1.3.1, in capella 1.3.0, go to “Representation per category” in the project explorer, and try to open diagrams.
At least one will not open, and you will have to delete it manually before proceeding migration to capella 1.3.1.
Best regards

Hi Philippe,
it worked!
Thank you very much.

Hi,
just to find the root cause of this invalid representation, do you know which kind of action has been done on this diagram?
Do you use Team for Capella?
Best regards,
Michel