OSXでthe trustAnchors parameter must be non-emptyって出る

しばらく放置してたプログラムの開発を再開した。開発環境はMBP。OSX Mavericks。

で、起動したら、ある箇所で以下のようなExceptionが発生。

java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

ぐぐってみたら、JREの証明書がなんたらかんたら、と。詳細は省略するけど、Javaをインストールすれば(orし直せば)OK。MavericksではJavaがインストールされないの?

  • Java 6なら、Appleのサイトからダウンロード
  • Java 7なら、Oracleのサイトからダウンロード(JRE, JDK)

自分用メモ

スタックトレース

[error] application - [securesocial] error trying to get an access token for provider facebook
java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:1012) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:485) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:753) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:721) ~[na:1.6]
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:607) ~[na:1.6]
        at org.jboss.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1225) ~[netty.jar:na]
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.validator.PKIXValidator.(PKIXValidator.java:57) ~[na:1.6.0_32]
        at sun.security.validator.Validator.getInstance(Validator.java:161) ~[na:1.6.0_32]
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) ~[na:1.6]
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185) ~[na:1.6]
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183) ~[na:1.6.0_32]
        at java.security.cert.PKIXParameters.(PKIXParameters.java:103) ~[na:1.6.0_32]
        at java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:87) ~[na:1.6.0_32]
        at sun.security.validator.PKIXValidator.(PKIXValidator.java:55) ~[na:1.6.0_32]
        at sun.security.validator.Validator.getInstance(Validator.java:161) ~[na:1.6.0_32]
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108) ~[na:1.6]
[error] application - Unable to log user in. An exception was thrown
securesocial.core.AuthenticationException: null
        at securesocial.core.OAuth2Provider.securesocial$core$OAuth2Provider$$getAccessToken(OAuth2Provider.scala:67) ~[securesocial_2.10-2.1.2.jar:2.1.2]
        at securesocial.core.OAuth2Provider$$anonfun$3$$anonfun$apply$5$$anonfun$apply$8.apply(OAuth2Provider.scala:106) ~[securesocial_2.10-2.1.2.jar:2.1.2]
        at securesocial.core.OAuth2Provider$$anonfun$3$$anonfun$apply$5$$anonfun$apply$8.apply(OAuth2Provider.scala:104) ~[securesocial_2.10-2.1.2.jar:2.1.2]
        at scala.Option$WithFilter.map(Option.scala:206) ~[scala-library-2.10.3.jar:na]
        at securesocial.core.OAuth2Provider$$anonfun$3$$anonfun$apply$5.apply(OAuth2Provider.scala:104) ~[securesocial_2.10-2.1.2.jar:2.1.2]
        at securesocial.core.OAuth2Provider$$anonfun$3$$anonfun$apply$5.apply(OAuth2Provider.scala:103) ~[securesocial_2.10-2.1.2.jar:2.1.2]

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です