When an asset has been published under several contracts, a dataset with multiple policies will be generated upon a DCAT catalogue request. The result cannot be parsed by the Agent Plane:
DEBUG 2023-11-09T11:31:32.995791458 About to create an agreement for asset GraphAsset?oem=BehaviourTwinReliability at connector https://connector-release.edc.aws.bmw.cloudSEVERE 2023-11-09T11:31:33.161981434 Error in calling the control plane at http://tiera-control-plane:8181/management/v2/catalog/requestjava.lang.ClassCastException: class org.glassfish.json.JsonArrayBuilderImpl$JsonArrayImpl cannot be cast to class jakarta.json.JsonObject (org.glassfish.json.JsonArrayBuilderImpl$JsonArrayImpl and jakarta.json.JsonObject are in unnamed module of loader 'app') at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:244) at org.eclipse.tractusx.agents.edc.model.DcatDataset.(DcatDataset.java:31) at org.eclipse.tractusx.agents.edc.model.DcatCatalog.(DcatCatalog.java:42) at org.eclipse.tractusx.agents.edc.jsonld.JsonLd.processCatalog(JsonLd.java:38) at org.eclipse.tractusx.agents.edc.jsonld.JsonLd.processCatalog(JsonLd.java:34) at org.eclipse.tractusx.agents.edc.service.DataManagement.getCatalog(DataManagement.java:224) at org.eclipse.tractusx.agents.edc.service.DataManagement.findContractOffers(DataManagement.java:195) at org.eclipse.tractusx.agents.edc.AgreementController.createAgreement(AgreementController.java:233) at org.eclipse.tractusx.agents.edc.sparql.DataspaceServiceExecutor.createExecution(DataspaceServiceExecutor.java:324) at org.eclipse.tractusx.agents.edc.sparql.DataspaceServiceExecutor$1.lambda$hasNextResultBinding$0(DataspaceServiceExecutor.java:187) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
and an empty result with warning state (203) is generated.
Desired State
The catalogue should be parsed and an agreement can be made.
Observation
When an asset has been published under several contracts, a dataset with multiple policies will be generated upon a DCAT catalogue request. The result cannot be parsed by the Agent Plane:
DEBUG 2023-11-09T11:31:32.995791458 About to create an agreement for asset GraphAsset?oem=BehaviourTwinReliability at connector https://connector-release.edc.aws.bmw.cloudSEVERE 2023-11-09T11:31:33.161981434 Error in calling the control plane at http://tiera-control-plane:8181/management/v2/catalog/requestjava.lang.ClassCastException: class org.glassfish.json.JsonArrayBuilderImpl$JsonArrayImpl cannot be cast to class jakarta.json.JsonObject (org.glassfish.json.JsonArrayBuilderImpl$JsonArrayImpl and jakarta.json.JsonObject are in unnamed module of loader 'app') at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:244) at org.eclipse.tractusx.agents.edc.model.DcatDataset.(DcatDataset.java:31) at org.eclipse.tractusx.agents.edc.model.DcatCatalog.(DcatCatalog.java:42) at org.eclipse.tractusx.agents.edc.jsonld.JsonLd.processCatalog(JsonLd.java:38) at org.eclipse.tractusx.agents.edc.jsonld.JsonLd.processCatalog(JsonLd.java:34) at org.eclipse.tractusx.agents.edc.service.DataManagement.getCatalog(DataManagement.java:224) at org.eclipse.tractusx.agents.edc.service.DataManagement.findContractOffers(DataManagement.java:195) at org.eclipse.tractusx.agents.edc.AgreementController.createAgreement(AgreementController.java:233) at org.eclipse.tractusx.agents.edc.sparql.DataspaceServiceExecutor.createExecution(DataspaceServiceExecutor.java:324) at org.eclipse.tractusx.agents.edc.sparql.DataspaceServiceExecutor$1.lambda$hasNextResultBinding$0(DataspaceServiceExecutor.java:187) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
and an empty result with warning state (203) is generated.
Desired State
The catalogue should be parsed and an agreement can be made.