Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticPointFormatsExtension #60

Open
sivakumargavs opened this issue Jul 18, 2018 · 2 comments

Comments

@sivakumargavs
Copy link

Hi,

I have followed the steps in the github readme.md doc, when I run ./play run after generating certificates. I'm getting the following. I belive it is something todo with jdk. Could you please elabore little bit more details

`
[azureuser@GAVEL3-CLUSTER03 play-scala-tls-example]$ ./play run
[jetty-alpn-agent] Using: alpn-boot-8.1.11.v20170118.jar
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /home/azureuser/.sbt/1.0/staging/27667c294a34329f651e/play-scala-tls-example/project
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Set current project to play-tls-example (in build file:/opt/gavel/siva/soc_work/play-scala-tls-example/)

--- (Running the application, auto-reloading is enabled) ---

[info] p.a.h.EnabledFilters - Enabled Filters (see https://www.playframework.com/documentation/latest/Filters):

play.filters.csrf.CSRFFilter
play.filters.headers.SecurityHeadersFilter
play.filters.hosts.AllowedHostsFilter

[info] play.api.Play - Application started (Dev)

[info] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...
[info] p.c.s.AkkaHttpServer - Listening for HTTPS on /0:0:0:0:0:0:0:0:9443
(Server started, use Enter to stop and go back to the console...)

[jetty-alpn-agent] Replacing: sun/security/ssl/ServerHandshaker
[jetty-alpn-agent] Replacing: sun/security/ssl/ClientHandshaker
[jetty-alpn-agent] Replacing: sun/security/ssl/HelloExtensions
[jetty-alpn-agent] Replacing: sun/security/ssl/ExtensionType
Uncaught error from thread [play-dev-mode-akka.actor.default-dispatcher-2]: sun/security/ssl/SupportedEllipticPointFormatsExtension, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[play-dev-mode]
java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticPointFormatsExtension
at sun.security.ssl.HelloExtensions.(HelloExtensions.java:84)
at sun.security.ssl.HandshakeMessage$ClientHello.(HandshakeMessage.java:245)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:224)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:992)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:989)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1467)
at akka.stream.impl.io.TLSActor.runDelegatedTasks(TLSActor.scala:403)
at akka.stream.impl.io.TLSActor.doUnwrap(TLSActor.scala:372)
at akka.stream.impl.io.TLSActor.doInbound(TLSActor.scala:291)
at akka.stream.impl.io.TLSActor.$anonfun$bidirectional$1(TLSActor.scala:226)
at akka.stream.impl.Pump.pump(Transfer.scala:200)
at akka.stream.impl.Pump.pump$(Transfer.scala:198)
at akka.stream.impl.io.TLSActor.pump(TLSActor.scala:49)
at akka.stream.impl.SimpleOutputs$$anonfun$downstreamRunning$1.applyOrElse(ActorProcessor.scala:238)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
at akka.stream.impl.SubReceive.apply(Transfer.scala:17)
at akka.stream.impl.FanOut$OutputBunch$$anonfun$subreceive$1.applyOrElse(FanOut.scala:230)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
at akka.stream.impl.SubReceive.apply(Transfer.scala:17)
at akka.stream.impl.SubReceive.apply(Transfer.scala:13)
at scala.PartialFunction.applyOrElse(PartialFunction.scala:123)
at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122)
at akka.stream.impl.SubReceive.applyOrElse(Transfer.scala:13)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
at akka.actor.Actor.aroundReceive(Actor.scala:517)
at akka.actor.Actor.aroundReceive$(Actor.scala:515)
at akka.stream.impl.io.TLSActor.aroundReceive(TLSActor.scala:49)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[ERROR] [SECURITY][07/18/2018 16:36:53.930] [play-dev-mode-akka.actor.default-dispatcher-2] [akka.actor.ActorSystemImpl(play-dev-mode)] Uncaught error from thread [play-dev-mode-akka.actor.default-dispatcher-2]: sun/security/ssl/SupportedEllipticPointFormatsExtension, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play-dev-mode]
java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticPointFormatsExtension
at sun.security.ssl.HelloExtensions.(HelloExtensions.java:84)
at sun.security.ssl.HandshakeMessage$ClientHello.(HandshakeMessage.java:245)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:224)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:992)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:989)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1467)
at akka.stream.impl.io.TLSActor.runDelegatedTasks(TLSActor.scala:403)
at akka.stream.impl.io.TLSActor.doUnwrap(TLSActor.scala:372)
at akka.stream.impl.io.TLSActor.doInbound(TLSActor.scala:291)
at akka.stream.impl.io.TLSActor.$anonfun$bidirectional$1(TLSActor.scala:226)
at akka.stream.impl.Pump.pump(Transfer.scala:200)
at akka.stream.impl.Pump.pump$(Transfer.scala:198)
at akka.stream.impl.io.TLSActor.pump(TLSActor.scala:49)
at akka.stream.impl.SimpleOutputs$$anonfun$downstreamRunning$1.applyOrElse(ActorProcessor.scala:238)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
at akka.stream.impl.SubReceive.apply(Transfer.scala:17)
at akka.stream.impl.FanOut$OutputBunch$$anonfun$subreceive$1.applyOrElse(FanOut.scala:230)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
at akka.stream.impl.SubReceive.apply(Transfer.scala:17)
at akka.stream.impl.SubReceive.apply(Transfer.scala:13)
at scala.PartialFunction.applyOrElse(PartialFunction.scala:123)
at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122)
at akka.stream.impl.SubReceive.applyOrElse(Transfer.scala:13)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
at akka.actor.Actor.aroundReceive(Actor.scala:517)
at akka.actor.Actor.aroundReceive$(Actor.scala:515)
at akka.stream.impl.io.TLSActor.aroundReceive(TLSActor.scala:49)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

`

@marcospereira
Copy link
Member

Hi @sivakumargavs,

Which JDK version are you using? This can be a compatibility problem between your JDK version and jetty-alpn-agent version used by Play (and this sample app).

@wsargent
Copy link
Member

wsargent commented Jul 24, 2018

You are not using the SunEC provider https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunEC which is an Oracle JDK specific jar -- sunec.jar. See http://armoredbarista.blogspot.com/2013/10/how-to-use-ecc-with-openjdk.html for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants