CSV import in a repository model with ACLI

Started by Nick, September 27, 2022, 12:55:27 PM

Previous topic - Next topic

Nick

Hi, I'm trying to automate some tasks with ACLI and I would like to import some CSV files into a model loaded with --modelrepository.loadModel but it looks like something isn't working well, I have the following error :

[LoadModelFromRepositoryProvider] Loading model at .\MY_MODEL_LOCATION
[LoadModelFromRepositoryProvider] Loaded model: 'MY_MODEL'
[CSV] Importing csv from .\MY_CSV.csv to 'MY_MODEL'
java.lang.NullPointerException
at com.archimatetool.csv.importer.CSVImporter.doImport(CSVImporter.java:123)
        at com.archimatetool.csv.commandline.ImportCSVProvider.run(ImportCSVProvider.java:71)
        at com.archimatetool.commandline.CentralScrutinizer.runProviderOptions(CentralScrutinizer.java:164)
        at com.archimatetool.commandline.CentralScrutinizer.start(CentralScrutinizer.java:82)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
        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(Main.java:659)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Am I doing something wrong or is it impossible to import CSV in such model ?

Also another question by the way, is it possible to import multiple CSV files with a single ACLI command line ?

Phil Beauvoir

Please provide more details:

1. Archi version
2. coArchi version
3. The full command line you are using

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

Nick

Quote from: Phil Beauvoir on September 27, 2022, 13:02:02 PMPlease provide more details:

1. Archi version
2. coArchi version
3. The full command line you are using



1. I'm using Archi 4.9.3
2. coArchi 0.8.4
3. The command line is
.\Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository.loadModel .\MY_MODEL_LOCATION
--modelrepository.userName MY_USERNAME
--modelrepository.passFile .\PASSWORD_LOCATION
--csv.import .\MY_CSV.csv
-p

Where .\MY_MODEL_LOCATION is a model I cloned before from git

Nick

actually --modelrepository.userName and --modelrepository.passFile are useless here I just realized

Phil Beauvoir

Thanks for the report. I found the bug which I will fix in the next version of coArchi coming soon.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Nick

Quote from: Phil Beauvoir on September 27, 2022, 13:27:08 PMThanks for the report. I found the bug which I will fix in the next version of coArchi coming soon.

Great thank you very much for the quick reply ! About my other question, can I import multiple csv files in a model through a single command line ?

Phil Beauvoir

This is now fixed in coArchi 0.8.5:

https://www.archimatetool.com/plugins/

> can I import multiple csv files in a model through a single command line

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

Nick

Quote from: Phil Beauvoir on September 27, 2022, 14:12:46 PMThis is now fixed in coArchi 0.8.5:

https://www.archimatetool.com/plugins/

> can I import multiple csv files in a model through a single command line

No, sorry.

Thank you for all your answers and your fix !