Sun.security could not be found after updating Java

I have an application created using Play 2.0. I used the scribe-java library to use some OAuth services. Until today, everything was fine, but when I update jdk and restart the server, I could not use the scribe-java library. It seems to be using some classes like sun/security/pkcs11/P11Key and sun/security/pkcs11/Length in the sun.security package, but could not find it.

"java -version" returns this:

java version "1.7.0_03"

OpenJDK workspace (IcedTea7 2.1.1pre) (7 ~ u3-2.1.1 ~ pre1-1ubuntu3)

64-bit OpenJDK virtual machine (build 22.0-b10, mixed mode)

Play 2.0 stacktrace:

 ! @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] 
+2
source share
1 answer

After the next update, && upgrade, jdk was updated from 2.1.1 to 2.3.2, and the problem was fixed. It so happened that Oracle spent 2 hours sucks. :(

+2
source

All Articles