Getting Cert exception from SBT

Hi, I get following exception from running SBT command:


:::: ERRORS
    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

    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.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml

 

I run IntelliJ behind company firewall. However, I've already setup the proxy config and if I run sbt from command line it working fine, I've also imported the cert at <jdk>/jre/security/cacert. Anyone know why I still get this from IntelliJ?

8 comments
Comment actions Permalink

Thanks for the report. This seems to be a known issue: https://youtrack.jetbrains.com/issue/SCL-9856

Until we address it, a workaround that usually works is running sbt from command line to download all the required artifacts, and then from within IDEA. Please let me know if that doesn't help in this case.

0
Comment actions Permalink

I can run that at command line and it should have already get all required artifacts, how can I know what is missing? My local sbt version is 0.13.9

 

> inspect sbtVersion
[info] Setting: java.lang.String = 0.13.9
[info] Description:
[info]  Provides the version of sbt.  This setting should be not be modified.
[info] Provided by:
[info]  */*:sbtVersion
[info] Defined at:
[info]  (sbt.Defaults) Defaults.scala:135
[info] Delegates:
[info]  *:sbtVersion
[info]  {.}/*:sbtVersion
[info]  */*:sbtVersion
[info] Related:
[info]  */*:sbtVersion

0
Comment actions Permalink

Can you point to an example project that has the same problem for you? Then I can try to reproduce the issue :)

0
Comment actions Permalink

My project is not open source and cannot put at internet. However the error message is kind of strange, intellij already included SBT v0.13.13, right? But look like it still requesting 0.13.13


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.13: not found
Error during sbt execution: Error retrieving required libraries
  (see C:\Users\cyim\.sbt\boot\update.log for complete log)
Error: Could not retrieve sbt 0.13.13
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0

 

0
Comment actions Permalink

IntelliJ just includes the sbt launcher, most of the sbt code still needs to be downloaded.

I realize you might not be able to share your code as such, but usually just the project definition or a similar project without any business code is enough to reproduce a problem with sbt.

From the error message, I would suggest trying to run sbt from the command line with a project configured to use sbt 0.13.13

0
Comment actions Permalink

 Thanks Justin, just tried with the command line and I found that I need to use installCert to add cert to my JDK to make it working:

http://stackoverflow.com/questions/21909799/establishing-socket-connection-through-proxy

 

In fact, SBT under Intellij also work after this. Thanks

0
Comment actions Permalink

Hi Justin

I encounter same problem. Does intellij had solve the problem ?

0

Please sign in to leave a comment.