Coder Social home page Coder Social logo

basyx-java-server-sdk's Introduction

Eclipse BaSyx Java V2 SDK Docker Pulls

BaSyx Logo

In this repository, the BaSyx Java V2 components fully compatible with Details of the Asset Administration Shell V3 are as well as their respective Clients are contained. For each component, a multitude of backends (e.g., InMemory, MongoDB) as well as further features (MQTT, ...) are provided. All components are available on DockerHub as off-the-shelf components and can be easily configured and extended. Additionally, the server SDK of this repository can be used for implementation of further components.

Server SDK

The following off-the-shelf components are available:

In addition, a blueprint for a Type 2/ Type 3 standalone submodel is provided:

Client SDK

In addition, the following Clients are available:

Documentation, Roadmap & Examples

In addition to the general documentation, each component has its own specific documentation that can be found in the respective folders. Additionally, we provide a general documentation on readthedocs. Furthermore, we are providing easy to use examples that can be leveraged for setting up your own AAS infrastructure. The future roadmap of BaSyx is described here.

Snapshot Releases

We're distributing our SNAPSHOT releases via DockerHub and Maven Central. For using the snapshots from Maven Central, add the following part to your project's POM:

<repository>
	<id>sonatype.snapshots</id>
	<name>Sonatype Snapshot Repository</name>
	<url>https://oss.sonatype.org/content/repositories/snapshots</url>
	<releases>
		<enabled>false</enabled>
	</releases>
	<snapshots>
		<enabled>true</enabled>
	</snapshots>
</repository>

Getting Involved & Contributing

If you would like to get involved with the BaSyx Community, the BaSyx Open Hour (every first Friday of the month) is an excellent starting point.

For contributing, please note the contribution guidelines. The overall process is described in the Eclipse wiki.

basyx-java-server-sdk's People

Contributors

aaronzi avatar ahoimariew avatar alexgordtop avatar daespen avatar dependabot[bot] avatar fischerrene avatar frankschnicke avatar friedjannik avatar geso02 avatar in-fke avatar jannisjung avatar jh-isw avatar kbchaithra avatar m-damm avatar mateusmolina-iese avatar mdanish98 avatar mhrimaz avatar msiebert-dev avatar oalagtash avatar patricekammognie avatar vasil-tenev avatar vivekhub97 avatar zhangzai123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

basyx-java-server-sdk's Issues

Performance Benchmark

This is more discussion rather than issue. But are you aware of any performance benchmark related to basyx? The only information that I have is this blog post which i guess it is for basyx v1.

There are also some questions/concerns regarding the benchmark in the blogpost:

  • It is mentioned MongoDB utilized, but also mentioned by increasing number of AAS, the memory consumption increase. Why does that happend if MongoDB utilize only disk for storage?
  • The other issue is reproducibility. It would be much better to use an azure/aws instance and have the benchmark code/script open-source. Maybe if someone has a plan to do a benchmark, they can think about this.
  • Why 200 – 8000 active AASs choosen? did you guys had an industrial requirement analysis? and is 10,000 request/s enough for a real-world use-case?

[Suggesstion] Endpoint to upload images and AASX files

Hello,

it would be very nice to upload images and AASX files to the AAS environment. This would be very useful to add already existing AAS and set the thumbnail or add image properties during runtime.

KR,
BlackRose01

Update base JDK image

Current JDK version is 11 however current LTS version is 21. Furthermore, an eclipse project using Amazon Corretto JDK. I guess it would be better to use Eclipse Temurin.

Endpoint "Serialization" seems not to work correctly

Hello,

for a test I tried to use the Endpoint "Serialization" and I don't know how to interpret the output because I expected a readable XML file with all the information about the given AAS's and Submodels. I attached a screenshot from Swagger and the XML file.
Maybe a small suggestion for the endpoint. The content of the output could be depend on the requested content type, which is given by the request header. So when you send a get request with the content-type "application/json" then you will receive a response with a JSON body and the content-type "application/xml" returns a XML document.

KR,
BlackRose01

Screenshot 2024-01-02 093922

XML File (Could not upload XML file beccause Github does not allow that, so I renamed the file to .txt)
response_1704184357304.xml.txt

AAS Environment Docker image not compatible with ARM

DUT: MacBook Pro M1 Max (2021)

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
14:35:45.249 [main] DEBUG org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - Application failed to start due to an exception
org.springframework.boot.context.config.ConfigDataResourceNotFoundException: Config data resource 'file [/usr/share/config/application.properties]' via location 'file:/usr/share/config/application.properties' cannot be found
at org.springframework.boot.context.config.ConfigDataResourceNotFoundException.withLocation(ConfigDataResourceNotFoundException.java:97)
at org.springframework.boot.context.config.ConfigDataImporter.handle(ConfigDataImporter.java:150)
at org.springframework.boot.context.config.ConfigDataImporter.load(ConfigDataImporter.java:141)
at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:87)
at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:116)
at org.springframework.boot.context.config.ConfigDataEnvironment.processInitial(ConfigDataEnvironment.java:240)
at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:227)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:102)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:94)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:102)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:87)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
at org.eclipse.digitaltwin.basyx.aasenvironment.component.AasEnvironmentComponent.main(AasEnvironmentComponent.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
14:35:45.266 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -

Error when loading an AASX version 3 designed by AASX Package Explorer

I tried to uplad an AASX file, that I created with the newest version of the AASX Package Explorer. But the docker exited with following message:

 aas-env-setup-aas-environment-1  | Loaded property file: file:application.properties
aas-env-setup-aas-environment-1  | Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
aas-env-setup-aas-environment-1  |   ____           _____
aas-env-setup-aas-environment-1  |  |  _ \         / ____|
aas-env-setup-aas-environment-1  |  | |_) |  __ _ | (___   _   _ __  __
aas-env-setup-aas-environment-1  |  |  _ <  / _` | \___ \ | | | |\ \/ /
aas-env-setup-aas-environment-1  |  | |_) || (_| | ____) || |_| | >  < 
aas-env-setup-aas-environment-1  |  |____/  \__,_||_____/  \__, |/_/\_\
aas-env-setup-aas-environment-1  | ======================== __/ |======
aas-env-setup-aas-environment-1  | AAS Environment         |___/
aas-env-setup-aas-environment-1  | 2.0.0-PREVIEW
aas-env-setup-aas-environment-1  | 
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:49.283  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on 41191ef49191 with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:49.285  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.423  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.433  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 MongoDB repository interfaces.
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.493  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.507  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.949  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.963  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:50.964  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:51.045  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:51.045  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1691 ms
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.300  WARN 1 --- [           main] o.e.d.a.v.d.aasx.AASXDeserializer        : AASX contains wrong Relationship namespace. This may be related to a bug in AASX Package Explorer or an old version of AAS4J. Future compatibility with the wrong namespace may not be guaranteed
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.507  WARN 1 --- [           main] o.e.d.a.v.d.aasx.AASXDeserializer        : AASX contains wrong Relationship namespace. This may be related to a bug in AASX Package Explorer or an old version of AAS4J. Future compatibility with the wrong namespace may not be guaranteed
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.529  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'preconfigurationLoaderInitializer' defined in URL [jar:file:/application/basyxExecutable.jar!/BOOT-INF/lib/basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/org/eclipse/digitaltwin/basyx/aasenvironment/preconfiguration/PreconfigurationLoaderInitializer.class]: Invocation of init method failed; nested exception is org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.533  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.552  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 
aas-env-setup-aas-environment-1  | 
aas-env-setup-aas-environment-1  | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
aas-env-setup-aas-environment-1  | 2023-12-01 11:55:52.577 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
aas-env-setup-aas-environment-1  | 
aas-env-setup-aas-environment-1  | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preconfigurationLoaderInitializer' defined in URL [jar:file:/application/basyxExecutable.jar!/BOOT-INF/lib/basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/org/eclipse/digitaltwin/basyx/aasenvironment/preconfiguration/PreconfigurationLoaderInitializer.class]: Invocation of init method failed; nested exception is org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) 
~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) ~[spring-context-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.10.jar!/:2.7.10]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.basyx.aasenvironment.component.AasEnvironmentComponent.main(AasEnvironmentComponent.java:42) ~[classes!/:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
aas-env-setup-aas-environment-1  |      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
aas-env-setup-aas-environment-1  |      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
aas-env-setup-aas-environment-1  |      at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  | Caused by: org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed     
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlDeserializer.read(XmlDeserializer.java:119) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXDeserializer.read(AASXDeserializer.java:100) ~[dataformat-aasx-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.AasEnvironmentPreconfigurationLoader.getEnvironmentFromFile(AasEnvironmentPreconfigurationLoader.java:155) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.AasEnvironmentPreconfigurationLoader.loadPreconfiguredEnvironment(AasEnvironmentPreconfigurationLoader.java:81) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]     
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.PreconfigurationLoaderInitializer.loadPreconfiguredEnvironment(PreconfigurationLoaderInitializer.java:76) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.PreconfigurationLoaderInitializer.afterPropertiesSet(PreconfigurationLoaderInitializer.java:68) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.26.jar!/:5.3.26]
aas-env-setup-aas-environment-1  |      ... 24 common frames omitted
aas-env-setup-aas-environment-1  | Caused by: com.fasterxml.jackson.databind.JsonMappingException: class com.fasterxml.jackson.databind.node.TextNode cannot be cast to class com.fasterxml.jackson.databind.node.ObjectNode (com.fasterxml.jackson.databind.node.TextNode and com.fasterxml.jackson.databind.node.ObjectNode are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @61a485d2) (through reference chain: org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultEnvironment["submodels"]->java.util.ArrayList[0]->org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel["submodelElements"]->org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty["qualifiers"])
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:392) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:351) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1821) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext.readRootValue(XmlDeserializationContext.java:91) ~[jackson-dataformat-xml-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4650) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2831) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.core.JsonParser.readValueAs(JsonParser.java:2277) ~[jackson-core-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.DeserializationHelper.createInstanceFromNode(DeserializationHelper.java:32) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementDeserializer.deserialize(SubmodelElementDeserializer.java:37) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer.getSubmodelElementFromJsonNode(SubmodelElementsDeserializer.java:103) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer.getSubmodelElementsFromObjectNode(SubmodelElementsDeserializer.java:80) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer.createSubmodelElements(SubmodelElementsDeserializer.java:61) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer.deserialize(SubmodelElementsDeserializer.java:53) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer.deserialize(SubmodelElementsDeserializer.java:36) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext.readRootValue(XmlDeserializationContext.java:91) ~[jackson-dataformat-xml-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597) ~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlDeserializer.read(XmlDeserializer.java:117) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      ... 31 common frames omitted
aas-env-setup-aas-environment-1  | Caused by: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.TextNode cannot be cast to class com.fasterxml.jackson.databind.node.ObjectNode (com.fasterxml.jackson.databind.node.TextNode and com.fasterxml.jackson.databind.node.ObjectNode are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @61a485d2)
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.DeserializationHelper.getRootObjectNode(DeserializationHelper.java:50) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.QualifierDeserializer.deserialize(QualifierDeserializer.java:62) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.QualifierDeserializer.deserialize(QualifierDeserializer.java:58) ~[dataformat-xml-1.0.0-milestone-04.jar!/:na]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
~[jackson-databind-2.13.5.jar!/:2.13.5]
aas-env-setup-aas-environment-1  |      ... 57 common frames omitted
aas-env-setup-aas-environment-1  |
aas-env-setup-aas-environment-1 exited with code 1

Then I saved the AAS in json format and this works with some warnings. The following messages occured:

aas-env-setup-aas-environment-1  | Loaded property file: file:application.properties
aas-env-setup-aas-environment-1  | Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
aas-env-setup-aas-environment-1  |   ____           _____
aas-env-setup-aas-environment-1  |  |  _ \         / ____|
aas-env-setup-aas-environment-1  |  | |_) |  __ _ | (___   _   _ __  __
aas-env-setup-aas-environment-1  |  |  _ <  / _` | \___ \ | | | |\ \/ /
aas-env-setup-aas-environment-1  |  | |_) || (_| | ____) || |_| | >  < 
aas-env-setup-aas-environment-1  |  |____/  \__,_||_____/  \__, |/_/\_\
aas-env-setup-aas-environment-1  | ======================== __/ |======
aas-env-setup-aas-environment-1  | AAS Environment         |___/
aas-env-setup-aas-environment-1  | 2.0.0-PREVIEW
aas-env-setup-aas-environment-1  | 
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:27.069  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on 41191ef49191 with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:27.071  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.261  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.271  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 MongoDB repository interfaces.
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.327  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.344  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.788  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.802  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.802  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.884  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:28.884  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1756 ms
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.098  WARN 1 --- [           main] o.e.d.a.v.d.aasx.AASXDeserializer        : AASX contains wrong Relationship namespace. This may be related to a bug in AASX Package Explorer or an old version of AAS4J. Future compatibility with the wrong namespace may not be guaranteed
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.459  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : -------------------- Aas Repository Features: --------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.459  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : -----------------------------------------------------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.460  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : ------------------ Aas Service Found Features: ------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.460  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : -----------------------------------------------------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.461  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -------------------- Submodel Repository Features: --------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.461  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -----------------------------------------------------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.462  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ------------------ Submodel Service Found Features: ------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.462  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : -----------------------------------------------------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.465  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : -------------------- Concept Description Repository Features: --------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:30.465  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : -----------------------------------------------------------------
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.298  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 
endpoint(s) beneath base path '/actuator'
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.418  INFO 1 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.418  INFO 1 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'AAS Environment.errorChannel' has 1 subscriber(s).
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.418  INFO 1 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started bean '_org.springframework.integration.errorLogger'
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.441  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8081 (http) with context path ''
aas-env-setup-aas-environment-1  | 2023-12-01 11:58:31.460  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Started AasEnvironmentComponent in 4.854 seconds (JVM running for 5.301)

To reproduce the problem use:

AASX-Package Explorer Version v2023-11-17
aas-env-setup.zip (In the zip-file both AAS formats are saved in /aas.)

Spring Warning "Autowired annotation is not supported on static methods" on SubmodelRepositoryConfiguration

Noticed this warning when I ran "AAS Environment".
Not sure, whether "static" or "@Autowired" are even necessary on these two methods.

Loaded property file: file:application.properties
Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
  ____           _____
 |  _ \         / ____|
 | |_) |  __ _ | (___   _   _ __  __
 |  _ <  / _` | \___ \ | | | |\ \/ /
 | |_) || (_| | ____) || |_| | >  <
 |____/  \__,_||_____/  \__, |/_/\_\
======================== __/ |======
AAS Environment         |___/
2.0.0-PREVIEW

2023-07-27 08:54:07.036  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on sphinx-basyx with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
2023-07-27 08:54:07.040  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"
2023-07-27 08:54:08.077  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2023-07-27 08:54:08.086  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 MongoDB repository interfaces.
2023-07-27 08:54:08.546  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)
2023-07-27 08:54:08.557  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-07-27 08:54:08.558  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
2023-07-27 08:54:08.625  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-07-27 08:54:08.626  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1528 ms
2023-07-27 08:54:08.811  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : -------------------- Aas Repository Features: --------------------
2023-07-27 08:54:08.811  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : -----------------------------------------------------------------
2023-07-27 08:54:08.813  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : ------------------ Aas Service Found Features: ------------------
2023-07-27 08:54:08.814  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : -----------------------------------------------------------------
2023-07-27 08:54:08.824  INFO 1 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : Autowired annotation is not supported on static methods: public static org.eclipse.digitaltwin.basyx.submodelservice.SubmodelServiceFactory org.eclipse.digitaltwin.basyx.submodelrepository.component.SubmodelRepositoryConfiguration.getSubmodelService(org.eclipse.digitaltwin.basyx.submodelservice.SubmodelServiceFactory,java.util.List)
2023-07-27 08:54:08.824  INFO 1 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : Autowired annotation is not supported on static methods: public static org.eclipse.digitaltwin.basyx.submodelrepository.SubmodelRepository org.eclipse.digitaltwin.basyx.submodelrepository.component.SubmodelRepositoryConfiguration.getSubmodelRepository(org.eclipse.digitaltwin.basyx.submodelrepository.SubmodelRepositoryFactory,java.util.List)
2023-07-27 08:54:08.825  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -------------------- Submodel Repository Features: --------------------
2023-07-27 08:54:08.825  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -----------------------------------------------------------------
2023-07-27 08:54:08.826  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ------------------ Submodel Service Found Features: ------------------
2023-07-27 08:54:08.827  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : -----------------------------------------------------------------
2023-07-27 08:54:08.836  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : -------------------- Concept Description Repository Features: --------------------
2023-07-27 08:54:08.837  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : -----------------------------------------------------------------
2023-07-27 08:54:10.208  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path ''
2023-07-27 08:54:10.254  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8081 (http) with context path ''
2023-07-27 08:54:10.272  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Started AasEnvironmentComponent in 3.759 seconds (JVM running for 4.278)

Serialization endpoint includeConceptDescriptions not working as expected

When trying to download a serialized version of an AAS the ConceptDescription array is missing in the downloaded AAS when setting includeConceptDescriptions=true. Even when no ConceptDescription exists for the given AAS/Submodel, an empty array should be included. If it's not, the downloaded AAS can for example not be opened in the Package Explorer.

For downloading JSON or XML files, it's not that big of an issue because the data can easily be completed (with ConceptDescriptions: [] in the case of JSON for example).

When downloading .aasx files this is not possible. It would be nice to always include the ConceptDescription key when includeConceptDescription is set to true.

To reproduce the issue you can download any of the AASs in the example here through the AAS Environment. This would be an example get-request:
http://localhost:1500/serialization?aasIds=aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9Bc3NldEFkbWluaXN0cmF0aW9uU2hlbGw&submodelIds=aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9TdWJtb2RlbA&includeConceptDescriptions=true

Running example returns empty array

OS: Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-89-generic x86_64)

The example seems to be unable to load aasx package. I did:

git clone https://github.com/eclipse-basyx/basyx-java-server-sdk.git
cd basyx-java-server-sdk/examples/
docker compose up -d
curl http://localhost:8081/shells

returns:
[]

What's the problem and how do I fix it?

[Suggestion] Update Wiki for AAS Service configuration

Hi,

for our project I have to set up some AAS Services and the documentation how to create the configuration/properties files is hard to understand. Today I had a look into the source code here and I saw that you use Spring Boot. Please mention this in your documentation. This will make your explanations easier, since many settings can be found in the official Spring Boot documentation. You can also hightlight which properties are important for the AAS. This will allow you to focus more on describing your own definitions.

KR,
BlackRose01

Error 400 when posting validated JSON to AAS Repository

Hello,

when I post an AAS, that was previously validated with it's JSON Schema, to the /shells endpoint, I get an 400 error, that says the following:

connection: close content-length: 0 date: Tue,27 Jun 2023 19:56:36 GMT

I'm running the AAS repository based on the official docker-image (eclipsebasyx/aas-repository:2.0.0-SNAPSHOT ).

The JSON-body posted to the endpoint was the following simplified example:

{ "embeddedDataSpecifications": [ { "dataSpecification": { "type": "EXTERNAL_REFERENCE", "keys": [{ "type": "GLOBAL_REFERENCE", "value": "example_value" }] }, "dataSpecificationContent": { "modelType": "DataSpecificationIEC61360", "preferredName": [{ "language": "en", "text": "example_name" }], "valueFormat": "xs:string", "value": "example_value_content" } } ], "idShort": "example_id_short", "modelType": "AssetAdministrationShell", "id": "example_id", "assetInformation": { "assetKind": "INSTANCE" } }

Interestingly, removing the "dataSpecification" makes the request working. Are there some errors in the data speficiation? Validations of the JSON schema are correct and it was originally created with the basyx-python-sdk and parsed into a python-client generated from the openAPI specification of the AAS repository.

I hope you can help. Thank you.

AAS-Environment exited with failure on docker start up

I clone the repo (https://github.com/eclipse-basyx/basyx-java-server-sdk/tree/main/examples) with the examples and only run the docker-compose up command. But then the aas-environment exited with the following code

2023-11-28 13:40:36 Loaded property file: file:application.properties
2023-11-28 13:40:36 Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
2023-11-28 13:40:36   ____           _____              
2023-11-28 13:40:36  |  _ \         / ____|             
2023-11-28 13:40:36  | |_) |  __ _ | (___   _   _ __  __
2023-11-28 13:40:36  |  _ <  / _` | \___ \ | | | |\ \/ /
2023-11-28 13:40:36  | |_) || (_| | ____) || |_| | >  < 
2023-11-28 13:40:36  |____/  \__,_||_____/  \__, |/_/\_\
2023-11-28 13:40:36 ======================== __/ |======      
2023-11-28 13:40:36 AAS Environment         |___/                  
2023-11-28 13:40:36 2.0.0-PREVIEW
2023-11-28 13:40:36 
2023-11-28 13:40:36 2023-11-28 12:40:36.430  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on 4d4a1825ee0b with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
2023-11-28 13:40:36 2023-11-28 12:40:36.435  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"
2023-11-28 13:40:38 2023-11-28 12:40:38.119  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'getSubmodelServiceFactory' defined in class path resource [org/eclipse/digitaltwin/basyx/submodelrepository/MongoDBSubmodelRepositoryConfiguration.class]: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=mongoDBSubmodelRepositoryConfiguration; factoryMethodName=getSubmodelServiceFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/eclipse/digitaltwin/basyx/submodelrepository/MongoDBSubmodelRepositoryConfiguration.class]] for bean 'getSubmodelServiceFactory': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=submodelRepositoryConfiguration; factoryMethodName=getSubmodelServiceFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/eclipse/digitaltwin/basyx/submodelrepository/component/SubmodelRepositoryConfiguration.class]] bound.
2023-11-28 13:40:38 2023-11-28 12:40:38.156  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 
2023-11-28 13:40:38 
2023-11-28 13:40:38 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-11-28 13:40:38 2023-11-28 12:40:38.230 ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
2023-11-28 13:40:38 
2023-11-28 13:40:38 ***************************
2023-11-28 13:40:38 APPLICATION FAILED TO START
2023-11-28 13:40:38 ***************************
2023-11-28 13:40:38 
2023-11-28 13:40:38 Description:
2023-11-28 13:40:38 
2023-11-28 13:40:38 The bean 'getSubmodelServiceFactory', defined in class path resource [org/eclipse/digitaltwin/basyx/submodelrepository/MongoDBSubmodelRepositoryConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/eclipse/digitaltwin/basyx/submodelrepository/component/SubmodelRepositoryConfiguration.class] and overriding is disabled.
2023-11-28 13:40:38 
2023-11-28 13:40:38 Action:
2023-11-28 13:40:38 
2023-11-28 13:40:38 Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
2023-11-28 13:40:38

AAS Environment component MQTT conflicting beans

When starting up the AAS Environment component from code and enabling mqtt for different sub components, there appears to be a ConflictingBeanDefinitionException because the MqttConfiguration classes of the sub components share the same simple name.

application.properties:

basyx.aasrepository.feature.mqtt.enabled = true
basyx.submodelrepository.feature.mqtt.enabled = true
mqtt.clientId=TestClient
mqtt.hostname = localhost
mqtt.port = 1883

or

basyx.feature.mqtt.enabled = true
mqtt.clientId=TestClient
mqtt.hostname = localhost
mqtt.port = 1883

Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'mqttConfiguration' for bean class [org.eclipse.digitaltwin.basyx.submodelrepository.feature.mqtt.MqttConfiguration] conflicts with existing, non-compatible bean definition of same name and class [org.eclipse.digitaltwin.basyx.aasrepository.feature.mqtt.MqttConfiguration]

So you currently have to target a specific bean like only basyx.aasrepository.feature.mqtt.enabled = true. The different MQTTConfigurations look the same exception for the bean condition. If they should be idempotent, it could be extracted and reused I guess but maybe one could want to have different mqtt parametrizations per sub component. All of the sub components currently seem to be using mqtt.clientId for instance without the AAS Environment putting the different configuration properties into context.

Provide endpoint to get metamodel version

Hi,

it would be very nice to have an endpoint in the AAS Environment/AAS Registry REST API to monitor the version of the used meta model. With this information it would then be possible to integrate various AAS meta models in other systems. You can then use the version to decide which API version you need to use to obtain the necessary information. Currently it is not possible to see which AAS version is running.

KR,
BlackRose01

Connection to CosmosDB not working

We are trying to connect the basyx environment to a mongoDB. See here the

For that we run the following command in Windows powershell:
docker run --name=aas-env -p:8081:8081 -v C:/tmp/application.properties:/application/application.properties eclipsebasyx/aas-environment:2.0.0-SNAPSHOT -d

In the application.properties file we configure here the following environment variables:

server.port=8081
spring.application.name=AAS Environment
basyx.backend=MongoDB
spring.data.mongodb.host=test.mongo.cosmos.azure.com
spring.data.mongodb.port=10255
spring.data.mongodb.database=aasenvironments
spring.data.mongodb.authentication-database=admin
spring.data.mongodb.username=mongodb
spring.data.mongodb.password=password

When the container is started we get following log:

2023-08-23 14:03:30.446  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on ffeb9aa657e7 with PID 1 (/basyxExecutable.jar started by nobody in /)

2023-08-23 14:03:30.457  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"

2023-08-23 14:03:33.650  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.

2023-08-23 14:03:33.682  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 16 ms. Found 0 MongoDB repository interfaces.

2023-08-23 14:03:35.394  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)

2023-08-23 14:03:35.441  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2023-08-23 14:03:35.442  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]

2023-08-23 14:03:35.742  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

2023-08-23 14:03:35.742  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5055 ms

2023-08-23 14:03:39.176  WARN 1 --- [           main] o.e.d.a.v.d.core.util.ReflectionHelper   : could not auto-resolve target class for mixin 'DataSpecificationPhysicalUnitMixin'

2023-08-23 14:03:39.189  WARN 1 --- [           main] o.e.d.a.v.d.core.util.ReflectionHelper   : could not auto-resolve target class for mixin 'LangStringMixin'

2023-08-23 14:03:43.007  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path ''

2023-08-23 14:03:43.148  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8081 (http) with context path ''

2023-08-23 14:03:43.205  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Started AasEnvironmentComponent in 14.395 seconds (JVM running for 16.256)

2023-08-23 14:04:51.385  INFO 1 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'

2023-08-23 14:04:51.388  INFO 1 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'

2023-08-23 14:04:51.393  INFO 1 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 5 ms

Constructor called

We are confused for this special log here: Found 0 MongoDB repository interfaces. So it seems that the MongoDB connection was not established.

Nevertheless when we then post an AAS, it successful but it is not persisted in the mongoDB. Has anyone an idea here what we are missing in the configuration?

This would help us a lot, thanks in advance! :)

Build problem basyx.submodelrepository-tck transitive test dependency

Hello,

I am facing a build problem on one the recent commits (have tried on 2780d2b).

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project basyx.
submodelrepository-tck: Compilation failure: Compilation failure: 
[ERROR] basyx-java-server-sdk/basyx.submodelrepository/basyx.submodelr
epository-**tck/src/test/java/org/eclipse/digitaltwin/basyx/submodelrepository/tck/SubmodelRepositorySubmodelElementsTestDefinedURL.java:[
30,58] package org.eclipse.digitaltwin.basyx.submodelservice.http does not exist**
[ERROR] basyx-java-server-sdk/basyx.submodelrepository/basyx.submodelr
epository-tck/src/test/java/org/eclipse/digitaltwin/basyx/submodelrepository/tck/SubmodelRepositorySubmodelElementsTestDefinedURL.java:[
39,71] cannot find symbol
[ERROR]   symbol: class SubmodelServiceSubmodelElementsTestSuiteHTTP
[ERROR] basyx-java-server-sdk/basyx.submodelrepository/basyx.submodelr
epository-tck/src/test/java/org/eclipse/digitaltwin/basyx/submodelrepository/tck/SubmodelRepositorySubmodelElementsTestDefinedURL.java:[
45,72] cannot find symbol
[ERROR]   symbol:   method createSubmodel()
[ERROR]   location: class org.eclipse.digitaltwin.basyx.submodelrepository.tck.SubmodelRepositorySubmodelElementsTestDefinedURL
[ERROR] clean/basyx-java-server-sdk/basyx.submodelrepository/basyx.submodelr
epository-tck/src/test/java/org/eclipse/digitaltwin/basyx/submodelrepository/tck/SubmodelRepositorySubmodelElementsTestDefinedURL.java:[
53,9] method does not override or implement a method from a supertype

This is raised by the test source of basyx.submodelrepository-tck and it attempts to reference a test class from basyx.submodelservice-http.

The pom of basyx.submodelrepository-tck depends on the tests artifact of basyx.submodelrepository-http and basyx.submodelrepository-http in turn depends on the tests artifact of basyx.submodelservice-http, so there is a path to the test class, but the test scope does not seem to work transitively (https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#dependency-scope). basyx.submodelrepository-http is still able to successfully import the test class for compilation when one tries that but basyx.submodelrepository-tck is not.

<! -- basyx.submodelrepository-tck/pom.xml -->
		<dependency>
			<groupId>org.eclipse.digitaltwin.basyx</groupId>
			<artifactId>basyx.submodelrepository-http</artifactId>
			<classifier>tests</classifier>
			<scope>test</scope>
		</dependency>
<! -- basyx.submodelrepository-http/pom.xml -->
		<dependency>
			<groupId>org.eclipse.digitaltwin.basyx</groupId>
			<artifactId>basyx.submodelservice-http</artifactId>
			<classifier>tests</classifier>
			<scope>test</scope>
		</dependency>

Updating Resources From Environment File Not Possible

When we upload aasx, json or xml files from the environment container, we can not update these resources again.

We need to restart the container - or start a new one - to upload the static file information again.

If the data is persisted in MongoDB, an exception is thrown in the "upload"-SpringBean on a new startup of the environment container.

We should handle exceptions and upload the updated resources when restarting the environment-container.

Possible approach:

  • use the "administration" attribute with version and revision to indicate that the resource (shell, content-description, submodel) changed
  • always override resources when no version or revision is assigned to the existing resource and the new resource
  • if version or revision is set, update the resource only if at least one of the attributes changed

Nice to have:

Monitor file changes with spring integration and handle file changes to upload aasx resources

AASX Download not working

With the newest container for the aas-environment on DockerHub the AASX-download is not working properly. The downloaded file can not be opened with the newest AASX package explorer. Also renaming the file from *.aasx to *.zip does not work in that sense that the zipped document cannot be accessed in windows file explorer.

Components and GUI

I'm currently looking into deploying multiple components and am identifying the following:

I'm able to deploy the AAS Repository 2.0.0-snapshot (eclipsebasyx/aas-repository:2.0.0-SNAPSHOT), and the submodel repository 2.0.0-snapshot (eclipsebasyx/submodel-repository:2.0.0-SNAPSHOT).

  • In the AAS repository - the AASX upload method is a stub and I also can't seem to get the feature to load - perhaps I could offer a PR if it's in the queue for development?
  • The Submodel repository does not seem to load the MQTT settings though I used the same properties file as for the AAS repository
  • Got a 400 empty when trying to add a Submodel to the submodel repository, though I tested it in the previous Basyx version - maybe I have to update something for the new AAS spec, but I got an empty response which could be changed
  • Is the AAS Web GUI (eclipsebasyx/aas-gui:v230703) currently incompatible with these components?
    It needs both a server and a registry - I couldn't get the repository to connect in place of the server.

InMemory variant looses SubmodelElements

We setup the Basyx Environment with the configuration basyx.backend=InMemory to use and test the basyx environment locally.

We did following steps to enter data in the repository:

  • POST an AAS with the endpoint /shells
  • POST a submodel with the endpoint /submodels
  • POST a submodelRef to the existing AAS with the endpoint /shells/{aasIdentifier}/submodel-refs
  • If we than access this submodel with the endpoint /submodels/{submodelIdentifier} it all looks good and we see the corresponding submodelElements
  • But if we then get the MetaData of this submodel with the endpoint /submodels/{submodelIdentifier}/$metadata, the result of this request is right and we see the MetaData of this submodel
  • But after that MetaData call if we do again the request to see the submodel with the endpoint /submodels/{submodelIdentifier}, the submodel itself looks good but the submodelElements key is not there anymore

So it seems that here is a bug when calling the MetaData of submodel endpoint it then deletes the corresponding submodelElements of this submodel.

SubmodelRepository using MongoDB instead of basyx.backend = InMemory

I tried running a SubmodelRepository using InMemory configuration.
I used this for application.properties:

server.port=8081

spring.application.name=Submodel Repository
basyx.smrepo.name = sm-repo
basyx.backend = InMemory

management.endpoints.web.base-path=/

and ran this command:

docker run --name=sm-repo -p 8081:8081 -v ./application.properties:/application/application.properties:ro eclipsebasyx/submodel-repository:2.0.0-SNAPSHOT

After startup, a GET request to localhost:8081/health takes very long and return DOWN.

I get this log output:

Loaded property file: file:application.properties
Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
  ____           _____              
 |  _ \         / ____|             
 | |_) |  __ _ | (___   _   _ __  __
 |  _ <  / _` | \___ \ | | | |\ \/ /
 | |_) || (_| | ____) || |_| | >  < 
 |____/  \__,_||_____/  \__, |/_/\_\
======================== __/ |======      
Submodel Repository     |___/                  
2.0.0-PREVIEW

2023-10-02 13:59:27.344  INFO 1 --- [           main] o.e.d.b.s.c.SubmodelRepositoryComponent  : Starting SubmodelRepositoryComponent v2.0.0-SNAPSHOT using Java 11.0.19 on 7074c84b832b with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
2023-10-02 13:59:27.347  INFO 1 --- [           main] o.e.d.b.s.c.SubmodelRepositoryComponent  : No active profile set, falling back to 1 default profile: "default"
2023-10-02 13:59:27.891  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2023-10-02 13:59:27.896  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 MongoDB repository interfaces.
2023-10-02 13:59:28.158  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)
2023-10-02 13:59:28.165  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-10-02 13:59:28.165  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
2023-10-02 13:59:28.211  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-10-02 13:59:28.212  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 825 ms
2023-10-02 13:59:28.323  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -------------------- Submodel Repository Features: --------------------
2023-10-02 13:59:28.323  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : ----------------------------------------------------------------- 
2023-10-02 13:59:28.324  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ------------------ Submodel Service Found Features: ------------------ 
2023-10-02 13:59:28.324  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ----------------------------------------------------------------- 
2023-10-02 13:59:29.199  INFO 1 --- [           main] org.mongodb.driver.client                : MongoClient with metadata {"driver": {"name": "mongo-java-driver|sync|spring-boot", "version": "4.6.1"}, "os": {"type": "Linux", "name": "Linux", "architecture": "amd64", "version": "5.15.0-60-generic"}, "platform": "Java/Amazon.com Inc./11.0.19+7-LTS"} created with settings MongoClientSettings{readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, journal=null}, retryWrites=true, retryReads=true, readConcern=ReadConcern{level=null}, credential=null, streamFactoryFactory=null, commandListeners=[io.micrometer.core.instrument.binder.mongodb.MongoMetricsCommandListener@4784013e], codecRegistry=ProvidersCodecRegistry{codecProviders=[ValueCodecProvider{}, BsonValueCodecProvider{}, DBRefCodecProvider{}, DBObjectCodecProvider{}, DocumentCodecProvider{}, IterableCodecProvider{}, MapCodecProvider{}, GeoJsonCodecProvider{}, GridFSFileCodecProvider{}, Jsr310CodecProvider{}, JsonObjectCodecProvider{}, BsonCodecProvider{}, EnumCodecProvider{}, com.mongodb.Jep395RecordCodecProvider@6f952d6c]}, clusterSettings={hosts=[localhost:27017], srvServiceName=mongodb, mode=SINGLE, requiredClusterType=UNKNOWN, requiredReplicaSetName='null', serverSelector='null', clusterListeners='[]', serverSelectionTimeout='30000 ms', localThreshold='30000 ms'}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, receiveBufferSize=0, sendBufferSize=0}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=10000, receiveBufferSize=0, sendBufferSize=0}, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[io.micrometer.core.instrument.binder.mongodb.MongoMetricsConnectionPoolListener@5965844d], maxConnecting=2}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverListeners='[]', serverMonitorListeners='[]'}, sslSettings=SslSettings{enabled=false, invalidHostNameAllowed=false, context=null}, applicationName='null', compressorList=[], uuidRepresentation=JAVA_LEGACY, serverApi=null, autoEncryptionSettings=null, contextProvider=null}
2023-10-02 13:59:29.201  INFO 1 --- [localhost:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server localhost:27017

com.mongodb.MongoSocketOpenException: Exception opening socket
        at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:180) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:193) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:157) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na]
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) ~[na:na]
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) ~[na:na]
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) ~[na:na]
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:na]
        at java.base/java.net.Socket.connect(Socket.java:609) ~[na:na]
        at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[mongodb-driver-core-4.6.1.jar!/:na]
        at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[mongodb-driver-core-4.6.1.jar!/:na]
        ... 4 common frames omitted

2023-10-02 13:59:29.380  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path ''
2023-10-02 13:59:29.405  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8081 (http) with context path ''
2023-10-02 13:59:29.417  INFO 1 --- [           main] o.e.d.b.s.c.SubmodelRepositoryComponent  : Started SubmodelRepositoryComponent in 2.356 seconds (JVM running for 2.638)

Seems like MongoDB is used and fails.

GlobalReference vs. ExternalReference

Uploading this submodel to submodel repository works

{
  "modelType": "Submodel",
  "semanticId": {
    "type": "ExternalReference",
    "keys": [
      {
        "type": "GlobalReference",
        "value": "https://admin-shell.io/sandbox/MySubmodel/0/1"
      }
    ]
  },
  "idShort": "MySubmodel",
  "submodelElements": [
	...
  ],
  "kind": "Instance",
  "id": "https://example.com/demo/my/113627d2-d755-409f-8bee-1dedc76cc062"
}

whereas this doesn't:

{
  "modelType": "Submodel",
  "semanticId": {
    "type": "GlobalReference",
    "keys": [
      {
        "type": "GlobalReference",
        "value": "https://admin-shell.io/sandbox/MySubmodel/0/1"
      }
    ]
  },
  "idShort": "MySubmodel",
  "submodelElements": [
	...
  ],
  "kind": "Instance",
  "id": "https://example.com/demo/my/113627d2-d755-409f-8bee-1dedc76cc062"
}

When importing it in AASX Package Explorer, it's vice versa :-)

So: What is the official way to formulate the submodel - using ExternalReference or using GlobalReference?

Question: MongoDB backend planned for Submodel Repository?

Is it planned to provide a connector for MongoDB serving as a backend for the Submodel Repository? Or is the idea to use the AAS Repository backend for this - which would mean that after each startup the In-Memory DB of the SM-Repo is synchronized?

UoM

In the Asset Administration shell one can define unit of measure. But this Unit of Measure can not be retrieved using the API.

nightly docker image build

Is there any plan to have nightly(latest) docker images? The current docker images do not reflect the latest version of basyx.

For example the concept description image doesn't have pagination, though if you build and run locally, you would have pagination information in response. This is very confusing.

I built it locally in my own way. But, where can I find the information regarding building docker images locally? The documentation is for September 2022 which is not clear for me if it is updated and still relevant or not. Also, I got this error by following the maven command mvn install -Pdocker in the documentation:
[WARNING] The requested profile "docker" could not be activated because it does not exist.

Cannot use examples from admin-shell-io

Hi,

I tried to use the AAS example from admin-shell-io but I always receive errors. For example I used this one: http://www.admin-shell-io.com/samples/aasx/15_Siemens.aasx. When I use the AAS Server from the repository from admin-shell-io then the AAS works.

KR,
BlackRose01


Log From AAS Environment

2023-11-13 11:28:27 Loaded property file: file:application.properties
2023-11-13 11:28:27 Loaded property file: jar:file:/application/basyxExecutable.jar!/BOOT-INF/classes!/application.properties
2023-11-13 11:28:27   ____           _____              
2023-11-13 11:28:27  |  _ \         / ____|             
2023-11-13 11:28:27  | |_) |  __ _ | (___   _   _ __  __
2023-11-13 11:28:27  |  _ <  / _` | \___ \ | | | |\ \/ /
2023-11-13 11:28:27  | |_) || (_| | ____) || |_| | >  < 
2023-11-13 11:28:27  |____/  \__,_||_____/  \__, |/_/\_\
2023-11-13 11:28:27 ======================== __/ |======      
2023-11-13 11:28:27 AAS Environment         |___/                  
2023-11-13 11:28:27 2.0.0-PREVIEW
2023-11-13 11:28:27 
2023-11-13 11:28:27 2023-11-13 10:28:27.499  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : Starting AasEnvironmentComponent v2.0.0-SNAPSHOT using Java 11.0.19 on 613ee99b9e69 with PID 1 (/application/basyxExecutable.jar started by nobody in /application)
2023-11-13 11:28:27 2023-11-13 10:28:27.504  INFO 1 --- [           main] o.e.d.b.a.c.AasEnvironmentComponent      : No active profile set, falling back to 1 default profile: "default"
2023-11-13 11:28:29 2023-11-13 10:28:29.099  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2023-11-13 11:28:29 2023-11-13 10:28:29.111  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 MongoDB repository interfaces.
2023-11-13 11:28:29 2023-11-13 10:28:29.163  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2023-11-13 11:28:29 2023-11-13 10:28:29.180  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2023-11-13 11:28:29 2023-11-13 10:28:29.746  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (http)
2023-11-13 11:28:29 2023-11-13 10:28:29.764  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-11-13 11:28:29 2023-11-13 10:28:29.764  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
2023-11-13 11:28:29 2023-11-13 10:28:29.861  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-11-13 11:28:29 2023-11-13 10:28:29.861  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2261 ms
2023-11-13 11:28:30 2023-11-13 10:28:30.138  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : -------------------- Aas Repository Features: --------------------
2023-11-13 11:28:30 2023-11-13 10:28:30.138  INFO 1 --- [           main] o.e.d.b.a.c.AasRepositoryFeaturePrinter  : ----------------------------------------------------------------- 
2023-11-13 11:28:30 2023-11-13 10:28:30.141  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : ------------------ Aas Service Found Features: ------------------ 
2023-11-13 11:28:30 2023-11-13 10:28:30.141  INFO 1 --- [           main] o.e.d.b.a.c.AasServiceFeaturePrinter     : ----------------------------------------------------------------- 
2023-11-13 11:28:30 2023-11-13 10:28:30.171  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : -------------------- Submodel Repository Features: --------------------
2023-11-13 11:28:30 2023-11-13 10:28:30.171  INFO 1 --- [           main] d.b.s.c.SubmodelRepositoryFeaturePrinter : ----------------------------------------------------------------- 
2023-11-13 11:28:30 2023-11-13 10:28:30.173  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ------------------ Submodel Service Found Features: ------------------ 
2023-11-13 11:28:30 2023-11-13 10:28:30.173  INFO 1 --- [           main] .e.d.b.s.c.SubmodelServiceFeaturePrinter : ----------------------------------------------------------------- 
2023-11-13 11:28:30 2023-11-13 10:28:30.213  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : -------------------- Concept Description Repository Features: --------------------
2023-11-13 11:28:30 2023-11-13 10:28:30.213  INFO 1 --- [           main] nceptDescriptionRepositoryFeaturePrinter : ----------------------------------------------------------------- 
2023-11-13 11:28:32 2023-11-13 10:28:32.574  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preconfigurationLoaderInitializer' defined in URL [jar:file:/application/basyxExecutable.jar!/BOOT-INF/lib/basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/org/eclipse/digitaltwin/basyx/aasenvironment/preconfiguration/PreconfigurationLoaderInitializer.class]: Invocation of init method failed; nested exception is org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed
2023-11-13 11:28:32 2023-11-13 10:28:32.577  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-11-13 11:28:32 2023-11-13 10:28:32.602  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 
2023-11-13 11:28:32 
2023-11-13 11:28:32 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-11-13 11:28:32 2023-11-13 10:28:32.632 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
2023-11-13 11:28:32 
2023-11-13 11:28:32 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preconfigurationLoaderInitializer' defined in URL [jar:file:/application/basyxExecutable.jar!/BOOT-INF/lib/basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/org/eclipse/digitaltwin/basyx/aasenvironment/preconfiguration/PreconfigurationLoaderInitializer.class]: Invocation of init method failed; nested exception is org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) ~[spring-context-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.10.jar!/:2.7.10]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.basyx.aasenvironment.component.AasEnvironmentComponent.main(AasEnvironmentComponent.java:42) ~[classes!/:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2023-11-13 11:28:32 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
2023-11-13 11:28:32 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2023-11-13 11:28:32 at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
2023-11-13 11:28:32 at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[basyxExecutable.jar:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 Caused by: org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException: deserialization failed
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlDeserializer.read(XmlDeserializer.java:101) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXDeserializer.read(AASXDeserializer.java:94) ~[dataformat-aasx-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.AasEnvironmentPreconfigurationLoader.getEnvironmentFromFile(AasEnvironmentPreconfigurationLoader.java:155) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.AasEnvironmentPreconfigurationLoader.loadPreconfiguredEnvironment(AasEnvironmentPreconfigurationLoader.java:81) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.PreconfigurationLoaderInitializer.loadPreconfiguredEnvironment(PreconfigurationLoaderInitializer.java:76) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.basyx.aasenvironment.preconfiguration.PreconfigurationLoaderInitializer.afterPropertiesSet(PreconfigurationLoaderInitializer.java:68) ~[basyx.aasenvironment-core-2.0.0-SNAPSHOT.jar!/:2.0.0-SNAPSHOT]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.26.jar!/:5.3.26]
2023-11-13 11:28:32 ... 24 common frames omitted
2023-11-13 11:28:32 Caused by: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultEnvironment["submodels"]->java.util.ArrayList[0]->org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel["semanticId"]->org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference["keys"])
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:392) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:351) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1821) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext.readRootValue(XmlDeserializationContext.java:91) ~[jackson-dataformat-xml-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlDeserializer.read(XmlDeserializer.java:99) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 ... 31 common frames omitted
2023-11-13 11:28:32 Caused by: java.lang.NullPointerException: null
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.KeyDeserializer.readValue(KeyDeserializer.java:35) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.KeyDeserializer.readValue(KeyDeserializer.java:27) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.NoEntryWrapperListDeserializer.createEntriesFromObjectNode(NoEntryWrapperListDeserializer.java:66) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.NoEntryWrapperListDeserializer.deserialize(NoEntryWrapperListDeserializer.java:50) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.NoEntryWrapperListDeserializer.deserialize(NoEntryWrapperListDeserializer.java:36) ~[dataformat-xml-1.0.0-milestone-03.1.jar!/:na]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) ~[jackson-databind-2.13.5.jar!/:2.13.5]
2023-11-13 11:28:32 ... 46 common frames omitted

AAS Environment is not implementing the "Self-Description" interface

After running AAS environment, this works
curl http://localhost:8081/shells
but this does not:
curl http://localhost:8081/description
consistently, internal OpenAPI (Swagger) does not state that this interface would be available,
yet it should be available according to spec?

Lombok Delegate duplicate methods

Hello,

I am using IntelliJ and all the other Lombok annotations work but there are a few classes like RegistrationEventSendingAasRegistryStorage where the experimental Lombok annotation @lombok.experimental.Delegate is employed.

IntelliJ (seemingly not Maven) complains about methods that are already defined when the same method as the Delegate generates also is overwritten in the same class. According to the Lombok documentation, this is intended behavior.

All public non-Object methods that are part of the calculated type(s) are copied, whether or not you also wrote implementations for those methods. That would thus result in duplicate method errors. You can avoid these by using the @Delegate(excludes=SomeType.class) parameter to exclude all public methods in the excluded type(s), and their supertypes.
(https://projectlombok.org/features/experimental/Delegate)

Thus, it seems like some tools not complaining is a leniency and the methods that should not be generated because they are manually overwritten should probably be excluded.

Incompatible with AAS4j

The pull request for #144 aas4j upgrade cause issue due to dependency on removed internals of aas4j.

-\basyx-java-server-sdk\basyx.common\basyx.http\src\main\java\org\eclipse\digitaltwin\basyx\http\Aas4JHTTPSerializationExtension.java:31:65
java: package org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal does not exist
-\basyx-java-server-sdk\basyx.common\basyx.http\src\main\java\org\eclipse\digitaltwin\basyx\http\Aas4JHTTPSerializationExtension.java:63:37
java: cannot find symbol
  symbol:   class ReflectionAnnotationIntrospector
  location: class org.eclipse.digitaltwin.basyx.http.Aas4JHTTPSerializationExtension

[Suggestion] Merge configuration files to single file

Hi,

please consider to merge your various configuration files (context.properties, security.properties, etc.) to a single file. Spring Boot allows to create custom namespaces in the application.(yml | properties). This makes it easier to have configurations created automatically and to build them up more logically. For example, links can be made within the file. Furthermore, the configuration file is read in automatically. Thus no own parsers and the like must be implemented.

Likewise, the rbac_rules.json can be mapped in the configuration file using a map. However, I would advise against this, as it becomes very confusing with many roles. Therefore, a file path and flag should be sufficient. Jackson can then read the file.

KR,
BlackRose01

[Question] How to add basyx.aasregistry-service-inmemory-storage as dependency successfully

I tried to add the dependency as described in the README but I was not successful. My goal is to compile the entire Source Code using "mvn package" on my system. But for that I need to successfully pass all tests.

After some more research I found that the dependency version is missing.

First I looked through the SourceCode for the dependency to make sure it wasn't there to begin with.
Then I tried to locate the dependency on Maven central. It was not there either.

So now after another hour of trying to find it I am kind of stuck.
Maybe I am overthinking and the answer is very easy to find...

Anyway... Any help is much appreciated.

EDIT:
I did some more research:
The dependency "basyx.submodelregistry" is used in some more classes inside the repository. So I am sure that at some point it was existent under this ArtifactId. Could it have been renamed or integrated into another package?

Update Spring dependencies - End of Support for OS November 2023

Hi,

could you please update the used Spring dependencies to the latest 3.1.x version? The Open-Source support will end in November 2023 according to the following article. Be aware that there are several changes like variable accessing configuration variables and the Web Configuration.

https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0#consider-commercial-support
https://spring.io/projects/spring-boot#support

KR,
BlackRose01

Is Snapshot version functional?

Just tried to upload a submodel via the Swagger API and got a 400:

connection: close 
content-length: 0 
date: Tue,09 May 2023 13:35:38 GMT 

So, is the current Snapshot version really functional?

Submodel Max Depth Limit

On MongoDB (and almost any other document store that I know) there is maximum limit for the depth of objects .

The current schema for MongoDB doesn't support indefinite nesting level (SubmodelElementCollection inside SubmodelElementCollection). One approach can be to flatten out the content of submodel, maybe @s-heppner can have an idea on that (https://github.com/rwth-iat/aas_flattening). However, this might introduce lots of breaking changes, performance issues, or other challenges.

A minimal script to test the possible limit would be as follows:

import json
import uuid
import requests

def gen_nested_submodel_collections(nesting_level=5):
    submodel_collection = {"idShort": f"root", "modelType": "SubmodelElementCollection"}
    current = submodel_collection
    for i in range(nesting_level):
        new_collection = {"idShort": f"child_{i}", "modelType": "SubmodelElementCollection"}
        current['value'] = [new_collection]
        current = new_collection
    return submodel_collection


def test_maximum_depth():

    for nesting_level in range(85,100):
        print(nesting_level)
        nested_submodel_collections = gen_nested_submodel_collections(nesting_level=nesting_level)
        nested_submodel = {
            "id": f"NestedSubmodel_{str(uuid.uuid4())}",
            "kind": "Instance",
            "submodelElements": [nested_submodel_collections],
            "modelType": "Submodel",
        }
        basyx_root = "http://127.0.0.1:8085"
        submodel_repo = f"{basyx_root}/submodels/"
        payload = json.dumps(nested_submodel)
        headers = {
            "Content-Type": "application/json"
        }

        response = requests.request("POST", submodel_repo, headers=headers, data=payload)
        response.raise_for_status()

MongoDBAasRepository automatically creates AssetAdministrationShell.id, InMemoryAasRepository does not

MongoDBAasRepository (well, MongoDB, actually) automatically creates AssetAdministrationShell.id if null is passed for createAas()
Is this is bug or a feature?

If it's a feature, InMemoryAasRepository should also generate an id.

Currently InMemoryAasRepository allows to create a Shell with null id, and then throws CollidingIdentifierException if a second shell with id null is to be created. So it should either check for null / empty or generate one if null id given.

Containers not working with 'Azure Cosmos DB for MongoDB'

The current published Docker containers can't operate with "Azure Cosmos DB for MongoDB" as MongoDB backend. The logs show the error Command failed with error 115 (CommandNotSupported): ''text' is not supported' on server <Azure Cosmos DB for MongoDB name>. The full response is {"ok": 0.0, "errmsg": "'text' is not supported", "code": 115, "codeName": "CommandNotSupported"};

The reason seems to be on the site of Azure. The current version 4.2 of the Cosmos DB does not support all MongoDB features (Microsoft Documentation). However it might be desireable for BaSyx users to be able to use this Azure Resource.

Revise .gitignore for generated sources and "open-api" files

After building, my "git status" gives me, to be potentially addedd

        basyx.aasregistry/basyx.aasregistry-client-native/open-api/Plattform_i40-Registry-and-Discovery.yaml
        basyx.aasregistry/basyx.aasregistry-service-basemodel/open-api/Plattform_i40-Registry-and-Discovery.yaml
        basyx.aasregistry/basyx.aasregistry-service-mongodb-storage/open-api/Plattform_i40-Registry-and-Discovery.yaml
        basyx.aasregistry/basyx.aasregistry-service-mongodb-storage/open-api/temporary-extensions-result-file.yaml
        basyx.aasregistry/basyx.aasregistry-service/open-api/Plattform_i40-Registry-and-Discovery.yaml
        basyx.submodelregistry/basyx.submodelregistry-client-native/open-api/Plattform_i40-SubmodelRegistry-and-Discovery.yaml
        basyx.submodelregistry/basyx.submodelregistry-client-native/src/
        basyx.submodelregistry/basyx.submodelregistry-service-basemodel/open-api/Plattform_i40-SubmodelRegistry-and-Discovery.yaml
        basyx.submodelregistry/basyx.submodelregistry-service-basemodel/src/
        basyx.submodelregistry/basyx.submodelregistry-service-mongodb-storage/open-api/Plattform_i40-SubmodelRegistry-and-Discovery.yaml
        basyx.submodelregistry/basyx.submodelregistry-service-mongodb-storage/open-api/temporary-extensions-result-file.yaml
        basyx.submodelregistry/basyx.submodelregistry-service-mongodb-storage/src/generated/
        basyx.submodelregistry/basyx.submodelregistry-service/open-api/Plattform_i40-SubmodelRegistry-and-Discovery.yaml
        basyx.submodelregistry/basyx.submodelregistry-service/src/generated/

If these are not to be added to version control, .gitignore should probably be extended by:

# generated sources files (client-native...)
**/generated/

# generated API files
**/open-api/Plattform_i40-Registry-and-Discovery.yaml
**/open-api/Plattform_i40-SubmodelRegistry-and-Discovery.yaml
**/open-api/temporary-extensions-result-file.yaml

Not sure about the mechanics of the open-api files, though (some are committed, some seem to be generated).

Extensions in AAS are not being serialized

I am testing Extensions locally with the Application: org.eclipse.digitaltwin.basyx.aasrepository.component.AasRepositoryComponent and I am facing the problem that the extensions defined in the request body are not serialized and stored as empty list in MongoDB.

My POST request looks like:

curl --request POST \
  --url 'http://localhost:8081/shells?=' \
  --data '{
  "embeddedDataSpecifications": null,
  "extensions": [
    {
      "name": "someName",
      "value": "someValue",
      "valueType": "xs:string"
    },
    {
      "name": "anotherName",
      "value": "anotherValue"      
      "valueType": "xs:string"
    }
  ],
  "category": null,
  "idShort": "SomeShell",
  "displayName": [
    {
      "language": "de",
      "text": "Some Shell"
    },
    {
      "language": "en",
      "text": "Some Shell"
    }
  ],
  "description": [
    {
      "language": "de",
      "text": "some dummy shell"
    },
    {
      "language": "en",
      "text": "some dummy shell"
    }
  ],
  "modelType": "AssetAdministrationShell",
  "administration": {
    "embeddedDataSpecifications": null,
    "version": "1",
    "revision": "1.0",
    "creator": {
      "type": "ExternalReference",
      "keys": [
        {
          "type": "GlobalReference",
          "value": "https://example.com"
        }
      ],
      "referredSemanticId": null
    },
    "templateId": null
  },
  "id": "https://example.com/someshell",
  "derivedFrom": null,
  "assetInformation": {
    "assetKind": "Type",
    "globalAssetId": "https://example.com/someshell/v1/r1.0",
    "specificAssetIds": null,
    "assetType": null,
    "defaultThumbnail": null
  },
  "submodels": [
    {
      "type": "ModelReference",
      "keys": [
        {
          "type": "AssetAdministrationShell",
          "value": "https://example.com/someshell/v1/r1.0"
        },
        {
          "type": "Submodel",
          "value": "https://example.com/submodel/v1/r1.0"
        }
      ],
      "referredSemanticId": null
    }
  ]
}'

Created Document in MongoDB looks like:

{
  "_id": "https://example.com/someshell",
  "assetInformation": {
    "assetKind": "TYPE",
    "globalAssetID": "https://example.com/someshell/v1/r1.0",
    "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAssetInformation"
  },
  "submodels": [
    {
      "keys": [
        {
          "type": "ASSET_ADMINISTRATION_SHELL",
          "value": "https://example.com/someshell/v1/r1.0",
          "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey"
        },
        {
          "type": "SUBMODEL",
          "value": "https://example.com/submodel/v1/r1.0",
          "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey"
        }
      ],
      "type": "MODEL_REFERENCE",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference"
    }
  ],
  "extensions": [],
  "administration": {
    "creator": {
      "keys": [
        {
          "type": "GLOBAL_REFERENCE",
          "value": "https://example.com",
          "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey"
        }
      ],
      "type": "EXTERNAL_REFERENCE",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference"
    },
    "revision": "1.0",
    "version": "1",
    "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAdministrativeInformation"
  },
  "description": [
    {
      "language": "de",
      "text": "some dummy shell",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringTextType"
    },
    {
      "language": "en",
      "text": "some dummy shell",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringTextType"
    }
  ],
  "displayName": [
    {
      "language": "de",
      "text": "Some Shell",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringNameType"
    },
    {
      "language": "en",
      "text": "Some Shell",
      "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringNameType"
    }
  ],
  "idShort": "SomeShell",
  "_class": "org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAssetAdministrationShell"
}

My assumption is that the configured bean org.eclipse.digitaltwin.basyx.http.BaSyxHTTPConfiguration#jackson2ObjectMapperBuilder is missing Extensions configuration.

Could you please support me with this one?

De-Serialization of API parameter "assetIds"

First of all, there seems to be a discrepancy between the prose spec of the API parameter "assetIds" and the OpenAPI Spec.

Prose Spec
https://industrialdigitaltwin.org/en/wp-content/uploads/sites/2/2023/06/IDTA-01002-3-0_SpecificationAssetAdministrationShell_Part2_API_.pdf
states
Pages 114/115

When retrieving AssetAdministrationShells (/shells, /lookup/shells), a query parameter “?assetids=” can be specified. Such assetId may be a globalAssetId or specificAssetId. The corresponding keyvalue-pair is first serialized to JSON and then base64url-encoded. The resulting encoded string is the value of “?assetids=”.

This encoding (serialize to JSON + base64url) is also used for SpecificAssetIds, i.e. for GetAllAssetAdministrationShellIdsByAssetLink (/lookup/shells). For the example “[{"key": "globalAssetId","value": http://example.company/myAsset},{"key": "myOwnInternalAssetId","value": "12345ABC"}]”, the resulting base64url-encoded value of the query parameter is “?assetIds=W3sia2V5IjogImdsb2JhbEFzc2V0SWQiLCJ2YWx1ZSI6ICJodHRwOi8vZXhhbXBsZS5jb21wYW55L215QXNzZXQifSx7ImtleSI6ICJteU93bkludGVybmFsQXNzZXRJZCIsInZhbHVlIjogIjEyMzQ1QUJDIn1d”.

According to this spec, it's a single value.

OpenAPI Spec
According to https://app.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/parameters/AssetIds
The parameter is an array

A list of specific Asset identifiers. Each Asset identifier is a base64-url-encoded [SpecificAssetId]

To sum up:

  1. in prose, it's either an array of SpecificAssetId or a single SpecificAssetId, json-rendered and base64 encoded to a single value
  2. in YAML, it's an array of strings, each string resulting from a json-rendered, then base64 encoded SpecificAssetId

Also.

The server-side binding
https://github.com/eclipse-basyx/basyx-java-server-sdk/blob/main/basyx.aasrepository/basyx.aasrepository-http/src/main/java/org/eclipse/digitaltwin/basyx/aasrepository/http/AasRepositoryApiHTTPController.java#L101

public ResponseEntity<PagedResult> getAllAssetAdministrationShells(@Valid List<SpecificAssetID> assetIds, @Valid String idShort, @Min(1) @Valid Integer limit, @Valid String cursor)
would seem to imply that the OpenAPI spec is correct, but I don't see where it would be doing the Base64 decoding.
Depending on which spec is correct, the signature would have to be
List<String> encodedAssetIds
or
String encodedAssetIds
And they would need to be base64 decoded and then json-de-serialized.

All in all the "assetIds" parameter seems flawed with all this base64 encoding, also see admin-shell-io/aas-specs-api#19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.