Is there any restriction local version of the model ?

Started by z720, March 31, 2021, 10:01:49 AM

Previous topic - Next topic


I was trying to automate publication using the command line on a local repository but I couldn't get the model  loaded.

Is there any restriction using the .archimate file located in the .git folder?

I'm trying to do :

$ARCHIPATH/Archi -application -consoleLog -nosplash --loadModel .git/temp.archimate --html.createReport "html"
## or --script.runScript "$SCRIPT_LIB/test.ajs"

and I get the following error:

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
        at org.eclipse.emf.common.util.BasicEList.get(
        at com.archimatetool.editor.model.impl.EditorModelManager.loadModel(
        at com.archimatetool.commandline.CentralScrutinizer.runProviderOptions(
        at com.archimatetool.commandline.CentralScrutinizer.start(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(
        at org.eclipse.equinox.launcher.Main.basicRun(

test script only shows loaded model to the console and there is nothing loaded...

Loaded model []
Script Error: javax.script.ScriptException: com.archimatetool.script.ArchiScriptException: Could not get the currently selected model. Select a model before running this script.

Context: Archi 4.8.1 with macOS Catalina

Phil Beauvoir

The "temp.archimate" file is a working copy of the model that Archi uses when running so you should be able to perform standard operations on it using the Command Line.
Are you sure that your path to the file is correct? Can you actually open that "temp.archimate" file in Archi itself?

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.


I double checked the path: the model open in the UI from the same location using open .git/temp.archimate from the command line.

Phil Beauvoir

I've experimented a bit with this and found that using an absolute file path is needed on Mac. Did you try that?

The path to the model file provided on the command line is relative to the Archi application, not the current directory from where you are running the command, so you'll need to specify an absolute file path.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.


Right it seems that MacOS version requires an absolute path otherwise the /Applications/Archi/Content/MacOS folder is considered for relative path...

By the way, I think that the model content might also be in cause, I had a few weird issue with a model that disappeared after a few cleanup (Fix validation issue) but I couldn't spot which one...

So Fixed for the moment

I'll post on that topic again if I encounter such an issue.