Closed arnoweiss closed 1 year ago
Unfortunately, just from the stack trace, without additional information, it is difficult to understand which scenario led to the error. But from the hints I was able to divine, I tested with the latest version of the SDK (2.2.3), trying several operations which load and resolve models (such as "validate" command of the samm-cli), on the semantic model mentioned, with both the jar version and the native (Windows) version of the samm-cli but was not able to reproduce the error. All the operations I tried succeeded. To be able to further investigate the issue, we would need additional details, especially the OS the operation was executed on and more details as to the nature of the operation itself - from the stack trace it looks like an attempt to run unit tests - can the exact unit test causing the error be provided for investigation?
Thanks for the answer! Have you tried reproducing with the models and repository linked at the very bottom?
Additional context The base-directory for file resolution points to the top-level of the semantic models. I am getting the same error with urn:bamm:io.catenax.part_as_planned:1.0.0#PartAsPlanned. Using ESMF-SDK 2.2.0.
Yes.
@Test
void loadModel() {
final ResolutionStrategy fileSystemStrategy = new FileSystemStrategy( Path.of(BASE_DIR) );
final Try<VersionedModel> tryModel = new AspectModelResolver().resolveAspectModel( fileSystemStrategy,
AspectModelUrn.fromUrn( ASPECT_URN) );
System.out.println(tryModel.get());
}
BASE_DIR
is the path of sldt-semantic-models
ASPECT_URN
"urn:bamm:io.catenax.part_as_planned:1.0.0#PartAsPlanned"
JDK: 17.0.7-sapmchn
DIST: Ubuntu 22.04.2 LTS
Issue persists with esmf-sdk 2.2.3.
Hi @arnoweiss, I also can't reproduce the problem. I have prepared a minimal standalone demo project that (1) checks out the sldt-semantic-models repository, then (2) runs a unit test similar to yours, that loads the PartAsPlanned BAMM Aspect Model and asserts success:
https://github.com/atextor/esmf-sdk-bamm-resolution-demo
Clone the repo and run mvn clean test
.
It uses esmf-sdk 2.2.3 (but it also works with the latest version, 2.3.1). Loading the model works using both Adoptium/Temurin JDK (17.0.8) and SAP Machine JDK (17.0.7).
Therefore I'll close the issue now; feel free to reopen if necessary.
For some reason the https://github.com/atextor/esmf-sdk-bamm-resolution-demo works. No idea why. I've forked the repo and finished my project - so thanks!
Describe the bug RIOT fails to read Aspect Model file.
Where AspectModelResolver with the FileSystemStrategy.
Screenshots Stacktrace:
Additional context The base-directory for file resolution points to the top-level of the semantic models. I am getting the same error with
urn:bamm:io.catenax.part_as_planned:1.0.0#PartAsPlanned
. Using ESMF-SDK 2.2.0.