Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix play-scala-tls-example on Java 11 #17

Closed
dwijnand opened this issue May 27, 2019 · 3 comments
Closed

Fix play-scala-tls-example on Java 11 #17

dwijnand opened this issue May 27, 2019 · 3 comments
Assignees

Comments

@dwijnand
Copy link
Member

Example failure: travis-ci.com/playframework/play-samples/jobs/198439885

play-scala-tls-example should be removed from being allowed to fail on Java 11. Also, its test should not be pending(!!), possibly need to rewrite it (it failed on Java 8 too - it's always been pending until fixed).

I upgraded play-ws to ssl-config's changes for Java 11 (playframework/play-ws#346) but ran into the issues above about the test being pending and not passing on Java 8.

@ignasi35
Copy link
Member

After #18 I try running ./play test locally using a Java 11 JVM and get:


[info] ServerSpec:
[info] integration.ServerSpec *** ABORTED ***
[info]   java.lang.IllegalStateException: InternalDebug configuration error
[info]   at com.typesafe.sslconfig.ssl.debug.FixInternalDebugLogging.apply(FixInternalDebugLogging.scala:89)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configureJavaxNetDebug(DebugConfiguration.scala:22)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configure(DebugConfiguration.scala:15)
[info]   at play.api.libs.ws.ahc.StandaloneAhcWSClient$.apply(StandaloneAhcWSClient.scala:153)
[info]   at play.api.libs.ws.ahc.AhcWSClient$.apply(AhcWSClient.scala:71)
[info]   at integration.ServerSpec.<init>(ServerSpec.scala:29)
[info]   at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[info]   at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[info]   at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[info]   at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
[info]   ...
[info]   Cause: java.security.PrivilegedActionException:
[info]   at java.base/java.security.AccessController.doPrivileged(Native Method)
[info]   at com.typesafe.sslconfig.ssl.debug.FixInternalDebugLogging.apply(FixInternalDebugLogging.scala:86)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configureJavaxNetDebug(DebugConfiguration.scala:22)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configure(DebugConfiguration.scala:15)
[info]   at play.api.libs.ws.ahc.StandaloneAhcWSClient$.apply(StandaloneAhcWSClient.scala:153)
[info]   at play.api.libs.ws.ahc.AhcWSClient$.apply(AhcWSClient.scala:71)
[info]   at integration.ServerSpec.<init>(ServerSpec.scala:29)
[info]   at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[info]   at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[info]   at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[info]   ...
[info]   Cause: java.lang.ClassNotFoundException: sun.security.ssl.Debug
[info]   at java.base/java.lang.ClassLoader.findClass(ClassLoader.java:718)
[info]   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
[info]   at sbt.internal.inc.classpath.ClasspathFilter.loadClass(ClassLoaders.scala:70)
[info]   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[info]   at com.typesafe.sslconfig.ssl.debug.FixInternalDebugLogging$MonkeyPatchInternalSslDebugAction.run(FixInternalDebugLogging.scala:50)
[info]   at com.typesafe.sslconfig.ssl.debug.FixInternalDebugLogging$MonkeyPatchInternalSslDebugAction.run(FixInternalDebugLogging.scala:20)
[info]   at java.base/java.security.AccessController.doPrivileged(Native Method)
[info]   at com.typesafe.sslconfig.ssl.debug.FixInternalDebugLogging.apply(FixInternalDebugLogging.scala:86)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configureJavaxNetDebug(DebugConfiguration.scala:22)
[info]   at com.typesafe.sslconfig.ssl.debug.DebugConfiguration.configure(DebugConfiguration.scala:15)
[info]   ...
[info] ScalaTest
[info] Run completed in 1 second, 478 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 1
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] *** 1 SUITE ABORTED ***
[error] Error: Total 1, Failed 0, Errors 1, Passed 0
[error] Error during tests:
[error]         integration.ServerSpec
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 12 s, completed May 27, 2019, 7:21:43 PM

@dwijnand dwijnand removed the triage label May 27, 2019
@dwijnand
Copy link
Member Author

You need to use new play-ws: version 2.1.0-M2.

@dwijnand
Copy link
Member Author

Fixed in #19.

dwijnand added a commit that referenced this issue Jun 3, 2019
….6.x

* play-scala-log4j2-example/2.6.x: (36 commits)
  Nest play-scala-log4j2-example
  Updated with template-control on 2019-02-13T20:25:39.787Z (#39)
  Upgrade branch 2.6.x using TemplateControl (#37)
  Updated with template-control on 2019-01-17T15:10:57.918Z   /.mergify.yml:     wrote /.mergify.yml
  Updated with template-control on 2019-01-16T12:08:45.730Z   /LICENSE:     wrote /LICENSE   /NOTICE:     wrote /NOTICE   /.mergify.yml:     wrote /.mergify.yml   **build.gradle:         playTest "org.scalatestplus.play:scalatestplus-play_$scalaVersion:3.1.2"
  Updated with template-control on 2019-01-08T14:44:41.516Z (#33)
  Updated with template-control on 2019-01-04T17:13:24.081Z (#28)
  Remove JDK 9 & 10
  Updated with template-control on 2018-11-29T15:50:43.150Z   /.mergify.yml:     wrote /.mergify.yml
  Updated with template-control on 2018-10-08T19:11:41.210Z   **/plugins.sbt:     addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")   **build.gradle:     def playVersion = "2.6.20"
  Updated with template-control on 2018-09-11T20:14:50.549Z (#23)
  set log4j2.xml as javaOptions (#20)
  Updated with template-control on 2018-08-20T20:37:13.971Z (#22)
  Updated with template-control on 2018-07-19T01:58:55.708Z (#19)
  Updated with template-control on 2018-07-16T18:38:45.739Z (#18)
  Upgrade branch 2.6.x using TemplateControl (#17)
  Updated with template-control on 2018-05-27T23:54:08.860Z (#16)
  Updated with template-control on 2018-04-06T19:34:58.294Z (#14)
  Updated with template-control on 2018-03-02T18:56:28.624Z (#13)
  Upgrade branch 2.6.x using TemplateControl (#12)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants