0

I did n't faced any issues adding dropwizard-core, dropwizard-client to my pom.xml. But later to implement authentication and testing i tried to add dropwizard-auth and dropwizard-test maven dependencies to my pom.xml but unfortunately application is not picking up and i see them highlighted in red , eventhough pom.xml does n't show any error.

Below is my dependency list

App https://mvnrepository.com

<properties>
    <dropwizard.version>1.0.0</dropwizard.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <docker.registry.name></docker.registry.name><!-- leave empty for docker hub; use e.g. "localhost:5000/" for a local docker registry -->
    <docker.repository.name>${docker.registry.name}phauer/${project.artifactId}</docker.repository.name>
    <hbase.version>1.4.6</hbase.version>
</properties>


<dependencies>
    <dependency>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-core</artifactId>
        <version>${dropwizard.version}</version>
    </dependency>
    <dependency>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-client</artifactId>
        <version>${dropwizard.version}</version>
    </dependency>


    <dependency>
        <groupId>com.serviceenabled</groupId>
        <artifactId>dropwizard-request-tracker</artifactId>
        <version>2.0.0</version>
    </dependency>


    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8</version>
    </dependency>
    <dependency>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-testing</artifactId>
        <version>0.9.1</version>
    </dependency>
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>RELEASE</version>
    </dependency>
  </dependencies>

There is no error being shown on my pom.xml but my Dependencies tab is underlined in red color for those dependencies. Attached image shows how it looksenter image description here

I'm unable to find a fix why this is happening. It's happening only for specific maven dependencies. Please advice me regarding the same.

Maven compilation is throwing below error:

Downloading: https://repo.maven.apache.org/maven2/io/dropwizard/dropwizard-testing/0.9.1/dropwizard-testing-0.9.1.pom

Downloading: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-all/maven-metadata.xml

[WARNING] Could not transfer metadata org.hamcrest:hamcrest-all/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE

[ERROR] Failed to execute goal on project App Could not resolve dependencies for project com.app:App:jar:1.0-SNAPSHOT: Failed to collect dependencies at io.dropwizard:dropwizard-testing:jar:0.9.1: Failed to read artifact descriptor for io.dropwizard:dropwizard-testing:jar:0.9.1: Could not transfer artifact io.dropwizard:dropwizard-testing:pom:0.9.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

Please help me how to fix this issue

bigdata123
  • 453
  • 2
  • 8
  • 24
  • 2
    Is that image the most up to date with all the dependencies you currently have in your pom? It doesn't look like it matches up. – Paul Samsotha Oct 05 '18 at 00:41
  • The `unable to find valid certification path to requested target` should be about the `truststore` that it is not able to find the root certificate chain. Basically the https://repo.maven.apache.org/maven2 uses the commercial certificate which should be available at the `JDK cacerts`. Could you please show the `mvn -v`? It may be an issue about your JDK version. Please visit the https://stackoverflow.com/questions/9210514 for further information. – Charlee Chitsuk Oct 05 '18 at 01:55
  • JDK version setup is wrong based on the message. furthermore do not use `RELEASE` as a version... – khmarbaise Oct 05 '18 at 07:13
  • Thanks everyone for your valuable comments. I was able to fix this issue changing the dropwizard version from 1.0 to 1.3.4 as suggested by @PaulSamsotha – bigdata123 Oct 06 '18 at 06:41

0 Answers0