Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Basic 3 adding management-api as described in section #321

Closed
juerware opened this issue Oct 1, 2024 · 2 comments · Fixed by #322
Closed

Sample Basic 3 adding management-api as described in section #321

juerware opened this issue Oct 1, 2024 · 2 comments · Fixed by #322
Labels

Comments

@juerware
Copy link

juerware commented Oct 1, 2024

Bug Report

Describe the Bug

Following documentation in:
https://github.com/eclipse-edc/Samples/blob/main/basic/basic-03-configuration/README.md#management-api
in order to add:

dependencies {
    // ...
    implementation(libs.edc.management.api)
    // ...
}

I had the following error:

Exception in thread "main" org.eclipse.edc.spi.EdcException: org.eclipse.edc.boot.system.injection.EdcInjectionException: The following injected fields were not provided:
Field "jsonLd" of type [interface org.eclipse.edc.jsonld.spi.JsonLd] required by org.eclipse.edc.connector.api.management.configuration.ManagementApiConfigurationExtension
Field "assetService" of type [interface org.eclipse.edc.connector.controlplane.services.spi.asset.AssetService] required by org.eclipse.edc.connector.controlplane.api.management.asset.AssetApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.catalog.CatalogService] required by org.eclipse.edc.connector.controlplane.api.management.catalog.CatalogApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractagreement.ContractAgreementService] required by org.eclipse.edc.connector.controlplane.api.management.contractagreement.ContractAgreementApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractdefinition.ContractDefinitionService] required by org.eclipse.edc.connector.controlplane.api.management.contractdefinition.ContractDefinitionApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationService] required by org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.ContractNegotiationApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.policydefinition.PolicyDefinitionService] required by org.eclipse.edc.connector.controlplane.api.management.policy.PolicyDefinitionApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.transferprocess.TransferProcessService] required by org.eclipse.edc.connector.controlplane.api.management.transferprocess.TransferProcessApiExtension
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.onError(BaseRuntime.java:143)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:106)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:77)
Caused by: org.eclipse.edc.boot.system.injection.EdcInjectionException: The following injected fields were not provided:
Field "jsonLd" of type [interface org.eclipse.edc.jsonld.spi.JsonLd] required by org.eclipse.edc.connector.api.management.configuration.ManagementApiConfigurationExtension
Field "assetService" of type [interface org.eclipse.edc.connector.controlplane.services.spi.asset.AssetService] required by org.eclipse.edc.connector.controlplane.api.management.asset.AssetApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.catalog.CatalogService] required by org.eclipse.edc.connector.controlplane.api.management.catalog.CatalogApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractagreement.ContractAgreementService] required by org.eclipse.edc.connector.controlplane.api.management.contractagreement.ContractAgreementApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractdefinition.ContractDefinitionService] required by org.eclipse.edc.connector.controlplane.api.management.contractdefinition.ContractDefinitionApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationService] required by org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.ContractNegotiationApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.policydefinition.PolicyDefinitionService] required by org.eclipse.edc.connector.controlplane.api.management.policy.PolicyDefinitionApiExtension
Field "service" of type [interface org.eclipse.edc.connector.controlplane.services.spi.transferprocess.TransferProcessService] required by org.eclipse.edc.connector.controlplane.api.management.transferprocess.TransferProcessApiExtension
        at org.eclipse.edc.boot.system.DependencyGraph.of(DependencyGraph.java:102)
        at org.eclipse.edc.boot.system.ExtensionLoader.loadServiceExtensions(ExtensionLoader.java:120)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.createExtensions(BaseRuntime.java:163)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:91)
        ...

Expected Behavior

After executing:

./gradlew clean basic:basic-03-configuration:build; # it works right
java -Dedc.fs.config=basic/basic-03-configuration/config.properties -jar basic/basic-03-configuration/build/libs/filesystem-config-connector.jar; # it fails

We expect it works

Observed Behavior

Somewhere there is an unresolved dependecy

Steps to Reproduce

Steps to reproduce the behavior:

  1. Change file basic/basic-03-configuration/build.gradle.kts according to it said in: https://github.com/eclipse-edc/Samples/blob/main/basic/basic-03-configuration/README.md#management-api
  2. Execute: ./gradlew clean basic:basic-03-configuration:build; and it was right
  3. Execute: java -Dedc.fs.config=basic/basic-03-configuration/config.properties -jar basic/basic-03-configuration/build/libs/filesystem-config-connector.jar;
  4. Watch the error.

Context Information

  1. respository: https://github.com/eclipse-edc/Samples
  2. commit (last at the moment this was written): 27883d7
  3. java --version:
    openjdk 17.0.12 2024-07-16
    OpenJDK Runtime Environment (build 17.0.12+7-Ubuntu-1ubuntu222.04)
    OpenJDK 64-Bit Server VM (build 17.0.12+7-Ubuntu-1ubuntu222.04, mixed mode, sharing)

Detailed Description

It was explained above.

Possible Implementation

I don´t have that information.

@github-actions github-actions bot added the triage label Oct 1, 2024
Copy link

github-actions bot commented Oct 1, 2024

Thanks for your contribution 🔥 We will take a look asap 🚀

@ndr-brt
Copy link
Member

ndr-brt commented Oct 1, 2024

Thanks for reporting.
My thought here is that the "management api" paragraph does not belong to this sample, it should stay in a separate sample eventually.
I would just remove it as the management api are targeted by the transfer samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants