Sun.security不能升级后的Java中找到(Sun.security cannot be f

2019-09-22 10:15发布

我有玩2.0创建的应用程序。 我实现了划线Java库使用一些OAuth的服务。 直到今天一切都很好,但是当我的jdk升级和重新启动我不能用划线Java库的服务器。 看来它使用了一些类,如sun/security/pkcs11/P11Keysun/security/pkcs11/Length在sun.security包,但无法找到它。

“Java的版本”返回此:

Java版本 “1.7.0_03”

OpenJDK的运行时环境(IcedTea7 2.1.1pre)(7〜u3-2.1.1〜pre1-1ubuntu3)

OpenJDK的64位服务器VM(构建22.0-B10,混合模式)

播放2.0堆栈跟踪:

! @6bk5o8md2 - Internal server error, for request [GET /user/service/google/oauth_callback/?code=[SECRET]] ->

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NoClassDefFoundError: sun/security/pkcs11/P11Key]]
        at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.2]
        at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.2]
        at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
        at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.2]
        at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
Caused by: java.lang.NoClassDefFoundError: sun/security/pkcs11/P11Key
        at sun.security.pkcs11.P11ECKeyFactory.generatePublic(P11ECKeyFactory.java:234) ~[sunpkcs11.jar:na]
        at sun.security.pkcs11.P11ECKeyFactory.implTranslatePublicKey(P11ECKeyFactory.java:103) ~[sunpkcs11.jar:na]
        at sun.security.pkcs11.P11ECKeyFactory.engineGeneratePublic(P11ECKeyFactory.java:152) ~[sunpkcs11.jar:na]
        at java.security.KeyFactory.generatePublic(KeyFactory.java:334) ~[na:1.7.0_03]
        at sun.security.x509.X509Key.buildX509Key(X509Key.java:223) ~[na:1.7.0_03]
        at sun.security.x509.X509Key.parse(X509Key.java:170) ~[na:1.7.0_03]

Answer 1:

又经过更新升级&&,JDK从2.1.1pre升级到2.3.2,问题解决。 发生了什么事是Oracle浪费了我的2个小时,吸。 :(



文章来源: Sun.security cannot be found after upgrading Java