salaboy / pizza

Apache License 2.0
20 stars 11 forks source link

Unable to run the application locally with TestContainers #6

Closed roynilanjan closed 2 months ago

roynilanjan commented 2 months ago

Hi @salaboy ,

While running the command mvn spring-boot:test-run under the pizza-store directory I am getting the following exception : Failed to execute goal on project pizza-store: Could not resolve dependencies for project io.diagrid.dapr:pizza-store:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.github.wiremock:wiremock-testcontainers-java:jar:1.0-alpha-7: Failed to read artifact descriptor for com.github.wiremock:wiremock-testcontainers-java:jar:1.0-alpha-7: The following artifacts could not be resolved: com.github.wiremock:wiremock-testcontainers-java:pom:1.0-alpha-7 (absent): Could not transfer artifact com.github.wiremock:wiremock-testcontainers-java:pom:1.0-alpha-7 from/to jitpack.io (https://jitpack.io): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Can you share some help here ? Thanks,

salaboy commented 2 months ago

I am sure that the dependency changed or it was released.. check search.maven.org for the Right version. A pull Request with that change would be a great contribution to the example.

On Sat, 27 Apr 2024 at 16:41, Nilanjan Roy @.***> wrote:

Hi @salaboy https://github.com/salaboy ,

While running the command mvn spring-boot:test-run under the pizza-store directory I am getting the following exception : Failed to execute goal on project pizza-store: Could not resolve dependencies for project io.diagrid.dapr:pizza-store:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.github.wiremock:wiremock-testcontainers-java:jar:1.0-alpha-7: Failed to read artifact descriptor for com.github.wiremock:wiremock-testcontainers-java:jar:1.0-alpha-7: The following artifacts could not be resolved: com.github.wiremock:wiremock-testcontainers-java:pom:1.0-alpha-7 (absent): Could not transfer artifact com.github.wiremock:wiremock-testcontainers-java:pom:1.0-alpha-7 from/to jitpack.io (https://jitpack.io): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Can you share some help here ? Thanks,

— Reply to this email directly, view it on GitHub https://github.com/salaboy/pizza/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACCMXSXSHNSJXH45B5OTKTY7PBLPAVCNFSM6AAAAABG4F3HOKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DOMBWG42DGMQ . You are receiving this because you were mentioned.Message ID: @.***>

oleg-nenashev commented 2 months ago

Hello. This artifact is released only to GitHub packages. For Maven Central, make sure to use 1.0-alpha-13 or above https://github.com/wiremock/wiremock-testcontainers-java/releases/tag/1.0-alpha-13

roynilanjan commented 2 months ago

Thanks @oleg-nenashev . i could resove the issue with the version 1.0-alpha-13. Pizza store app is running fine. Hi @salaboy , With 1.0-alpha-13 version Pizza store app is running fine and it's accessible at localhost:8080. However I am not able to place order because the pizza-delivery app is not running. I tried starting the pizza-delivery app but it's unable to start due to the port 8080 already in use. Can you share a solution this ?

Thanks, Nilanjan

salaboy commented 2 months ago

@roynilanjan great to hear that with the new version it works. When developing applications locally, you are probably running one application at the time and mocking all the other services. If you want to run all the services together, you can run them in Kubernetes as described in the tutorial. This is mostly, you will need to start changing ports and connecting the services together manually if you want to run them only with spring boot.

salaboy commented 2 months ago

new version of testcontainers wiremock pushed to main, I am closing this issue now.