I am currently trying to generate an empty database in pgAdmin 4.29 using ili2pg. The Interlis model SIA405_ABWASSER_2015_LV95 is available here. The ili2pg-command I used is
java -jar ili2pg-4.4.4.jar --schemaimport --dbhost myhost --dbusr postgres --dbpwd ******
--dbdatabase mydb --dbschema test --setupPgExt --coalesceCatalogueRef --createEnumTabs
--sqlEnableNull --createFkIdx --coalesceMultiSurface --coalesceMultiLine --coalesceMultiPoint
--coalesceArray --beautifyEnumDispName --createGeomIdx --createMetaInfo --expandMultilingual
--createTypeConstraint --createEnumTabsWithId --createTidCol --importTid --smart2Inheritance
--createBasketCol --defaultSrsCode 2056 --trace --models SIA405_ABWASSER_2015_LV95 -modeldir my_dir
However, this command generates a java.lang.NullPointerException. According to the trace log, the error stems from an update in T_ILI2DB_SETTINGS after the EnumValueMap is done:
Info: createEnumValueMap(): SELECT iliCode,T_Id FROM test.sia4055_lv95sia405_bwssr_lk_haltung_lagebestimmung WHERE thisClass = 'SIA405_ABWASSER_2015_LV95.SIA405_Abwasser_LK.Haltung.Lagebestimmung' (EnumValueMap.java:52)
Info: updateMultiEnumTableWithId(): INSERT INTO test.sia4055_lv95sia405_bwssr_lk_haltung_lagebestimmung (seq,iliCode,itfCode,dispName,inactive,description,thisClass,baseClass) VALUES (?,?,?,?,?,?,?,?) (TransferFromIli.java:1504)
Info: readColumnTab(): SELECT tablename,subtype,columnname,tag,setting FROM test.T_ILI2DB_COLUMN_PROP (DbExtMetaInfo.java:144)
Info: saveColumnTab(): INSERT INTO test.T_ILI2DB_COLUMN_PROP (tablename,subtype,columnname,tag,setting) VALUES (?,?,?,?,?) (DbExtMetaInfo.java:91)
Info: readTableTab(): SELECT tablename,tag,setting FROM test.T_ILI2DB_TABLE_PROP (DbExtMetaInfo.java:232)
Info: saveTableTab(): INSERT INTO test.T_ILI2DB_TABLE_PROP (tablename,tag,setting) VALUES (?,?,?) (DbExtMetaInfo.java:184)
Info: readIliFiles(): SELECT filename,iliversion,modelName FROM test.T_ILI2DB_MODEL (TransferFromIli.java:457)
Info: addModels(): INSERT INTO test.T_ILI2DB_MODEL (filename,iliversion,modelName,content,importDate) VALUES (?,?,?,?,?) (TransferFromIli.java:585)
Info: updateSettings(): INSERT INTO test.T_ILI2DB_SETTINGS (tag,setting) VALUES (?,?) (TransferFromIli.java:736)
java.lang.NullPointerException
ch.ehi.ili2db.metaattr.MetaAttrUtility.visitElement(MetaAttrUtility.java:187)
ch.ehi.ili2db.metaattr.MetaAttrUtility.visitElement(MetaAttrUtility.java:194)
ch.ehi.ili2db.metaattr.MetaAttrUtility.visitElement(MetaAttrUtility.java:194)
ch.ehi.ili2db.metaattr.MetaAttrUtility.visitElement(MetaAttrUtility.java:194)
ch.ehi.ili2db.metaattr.MetaAttrUtility.updateMetaAttributesTable(MetaAttrUtility.java:160)
ch.ehi.ili2db.base.Ili2db.runSchemaImport(Ili2db.java:1291)
ch.ehi.ili2db.base.Ili2db.run(Ili2db.java:227)
ch.ehi.ili2db.AbstractMain.domain(AbstractMain.java:554)
ch.ehi.ili2pg.PgMain.main(PgMain.java:70)
Finished with errors!
using ili2gpkg results in the same error.