PKIX path building failed: sun.security.Provider.certpath.Suncertpathbuilderexception: Unable to find Valid Certification path to requested target url

Asked

Viewed 17,224 times

3

Hello,

I’m trying to compile my project using the sbt, but causes an SSL error:

inserir a descrição da imagem aqui

Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml

Below are my dependency files:

build properties.

sbt.version=0.13.13
template.uuid=fe200840-d458-4eeb-a289-d7aaef04c443

Dependencies.scala

import play.sbt.PlayImport
import sbt._

object Dependencies {

  val scala = "2.11.8"

  object thirdParty {
    val gson = "com.google.code.gson" % "gson" % "2.6.2"
    val postgresql = "org.postgresql" % "postgresql" % "9.4-1201-jdbc41"
    val h2database = "com.h2database" % "h2" % "1.4.187" % "test"
    val mockito = "org.mockito" % "mockito-core" % "1.8.5"
    val firebase = "com.google.firebase" % "firebase-server-sdk" % "3.0.1"
    val apkParser = "net.dongliu" % "apk-parser" % "2.1.6"
    val swagger = "io.swagger" %% "swagger-play2" % "1.5.3"
    val deadbolt = "be.objectify" %% "deadbolt-java" % "2.5.0"
    val jbcrypt = "org.mindrot" % "jbcrypt" % "0.3m"
    val flyway = "org.flywaydb" %% "flyway-play" % "3.1.0"
    val javassist = "org.javassist" % "javassist" % "3.20.0-GA"
  }

  val playDependencies: Seq[ModuleID] = Seq(
    PlayImport.javaJpa,
    PlayImport.cache,
    PlayImport.javaWs,
    PlayImport.filters,
    thirdParty.gson,
    thirdParty.postgresql,
    thirdParty.h2database,
    thirdParty.mockito,
    thirdParty.firebase,
    thirdParty.apkParser,
    thirdParty.swagger,
    thirdParty.deadbolt,
    thirdParty.jbcrypt,
    thirdParty.flyway,
    thirdParty.javassist
  )

}

plugins.sbt

resolvers ++= DefaultOptions.resolvers(snapshot = true)

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.9")

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.2.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2")

Please, help me, I’ve been on it for days. If you need anything else, just let me know.

1 answer

6


I found the problem.

I had to add my company’s network certificate to the JAVA CA certificate.

I used the code below:

"%JAVA_HOME%/jre/bin/keytool" -keystore "%JAVA_HOME%/jre/lib/security/cacerts" -importcert -alias MyCertificate -file "cert.cer"

The default password is changeit

  • 1

    I know it’s a little old that answer, but it helped me a lot in a program I had to use where I work.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.