Getting error while developing hello-world microservice

I am getting an error while developing hello-world microservice sdk for java in Cumulocity Iot

com.nsn.cumulocity.clients-java:microservice-autoconfigure:pom:1015.0.278 failed to transfer from maven repository during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of cumulocity has elapsed or updates are forced. Original error: Could not transfer artifact com.nsn.cumulocity.clients-java:microservice-autoconfigure:pom:1015.0.278 from/to cumulocity (maven repository): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

java-sdk version used: 11
c8y_version: 1015.0.278

Can you try this → java - Problems using Maven and SSL behind proxy - Stack Overflow ?

I’m guessing you are behind a corporate proxy causing that issue.

I tried the top 2 solutions given in the link.but the error persists,can you suggest any other solution?

This is a problem very related to your tooling, hardware and network infrastructure.
These answers should point you to a solution, assuming its an issue with certs of your corporate proxy:

make sure to not use https://repo.maven.apache.org/ but https://download.cumulocity.com/ to download the certificate and import in your keystore locally.
Also your pom.xml should contain this blog of course:

    <repositories>
        <repository>
            <id>cumulocity</id>
            <layout>default</layout>
            <url>https://download.cumulocity.com/maven/repository</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>cumulocity</id>
            <layout>default</layout>
            <url>https://download.cumulocity.com/maven/repository</url>
        </pluginRepository>
    </pluginRepositories>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.