PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url

1

Hello,

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

ServeraccessError:sun.security.validator.ValidatorException:PKIXpathbuildingfailed:sun.security.provider.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtorequestedtargeturl=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml

Belowaremydependencyfiles:

build.properties

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

Dependencies.scala

importplay.sbt.PlayImportimportsbt._objectDependencies{valscala="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 am days on it. If you need anything else, just let me know.

    
asked by anonymous 11.01.2018 / 18:44

1 answer

0

I found the problem.

I needed 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

    
23.01.2018 / 16:58