Closed bs-jokri closed 1 year ago
Validating the given model with the samm-cli built from the current "main" branch works. It looks like the bug has been fixed through some of the recent updates.
The problem seem still to exist as can be verified with model https://github.com/eclipse-tractusx/sldt-semantic-models/pull/257
:TimeUnitEnum a samm-c:Enumeration ;
samm:preferredName "Time Unit Enum"@en ;
samm:description "Enumerates all time units"@en ;
samm:dataType samm:curie ;
samm-c:values ( "unit:secondUnitOfTime"^^samm:curie "unit:minuteUnitOfTime"^^samm:curie "unit:hour"^^samm:curie "unit:day"^^samm:curie "unit:week"^^samm:curie "unit:month"^^samm:curie "unit:year"^^samm:curie ) .
leads to
Validation failed:
Validation succeeded, but an error was found while processing the model. This indicates an error in the model validation; please consider reporting this issue including the model at https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/issues -- Could not load Aspect model, please make sure the model is valid: Literal can not be parsed: unit:secondUnitOfTime^^urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#curie
A similar problem occurs also for same-cli 2.3.1 when validating model https://github.com/eclipse-tractusx/sldt-semantic-models/pull/283/files
which results in
java -Dpolyglot.engine.WarnInterpreterOnly=false -jar samm-cli-2.3.1.jar aspect io.catenax.generic.digital_product_passport/2.0.0/DigitalProductPassport.ttl validate
Validation failed:
Validation succeeded, but an error was found while processing the model. This indicates an error in the model validation; please consider reporting this issue including the model at https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/issues -- Could not load Aspect model, please make sure the model is valid: Literal can not be parsed: unit:day^^urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#curie
we had this issue in the past and it was fixed with https://github.com/eclipse-esmf/esmf-sdk/issues/303
probably this is a regression of this bug?
Hi @chris-volk, @RaMisess, what @ysrbo identified in his comment affects us at several models. Do you have an idea, why this happens?
Yes, the problem was that the literals with data type "curie", like "unit:day"^^samm:curie, were not properly migrated to the current version of the metamodel. This resulted in failure of the validation, where the model is instantiated as a last step of the process. As long as the latest version of the metamodel was 2.0.0, which matched the version of the model, there was no migration and everything was fine. With the introduction of metamodel 2.1.0 the migrator kicks in, which surfaced this problem.
Release v2.3.2 addresses this.
Release v2.4.0 addresses this.
Describe the bug Trying to validate a model with the following snippet with bamm-cli-2.1.3 is correct but with SAMM-CLI 2.2.2 not.
which validated. With the new SAMM-CLI the following validation error appears: https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_specified/1.0.0
switching to the SAMM 2.0.0 meta model resolves the problem. However, this is not possible for released models.
Where SAMM-CLI 2.2.2
Screenshots na
Additional context Add any other context about the problem here.