playframework/play-samples

Exception when executing play-scala-secure-session-example

antonini opened this issue · 7 comments

I received an exception while trying to execute the project.

....
[error] (Compile / compileIncremental) java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
[error] a.a.ActorSystemImpl - Internal server error, sending 500 response
akka.http.impl.util.One2OneBidiFlow$OutputTruncationException: Inner flow was completed without producing result elements for 1 outstanding elements
	at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
	at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
	at akka.http.impl.util.One2OneBidiFlow$One2OneBidi$$anon$1$$anon$4.onUpstreamFinish(One2OneBidiFlow.scala:97)
	at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:506)
	at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:376)
	at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:606)
	at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:485)
	at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:581)
	at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:749)
	at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:764)

Environment
SBT version: 1.3.2
JAVAC: 13 (Oracle)
JAVA: 13+13
play-samples branch: 2.7.x
libsodium: 1.0.18

That's really odd. Is there a way you can reproduce this?

Well, here are the steps that I've done:
Installed JDK from Oracle.
brew install sbt (to upgrade it)
brew install libsodium
Cloned https://github.com/playframework/play-samples/
Accessed the folder play-scala-secure-session-example
sbt run.

Today I've tried forcing upgrade my brew, libsodium, sbt and the error persists.
Attached is the logs.log of the execution today.

Hi @antonini, can you try again with JDK1.8 or JDK11?

I've noticed this is actually a compilation error (not a runtime error):

[info] Fetched artifacts of 
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Compiling 17 Scala sources and 1 Java source to /Users/eantonini/Documents/workspace/github.com/playframework/play-samples/play-scala-secure-session-example/target/scala-2.13/classes ...
[error] ## Exception when compiling 18 sources to /Users/eantonini/Documents/workspace/github.com/playframework/play-samples/play-scala-secure-session-example/target/scala-2.13/classes
[error] java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
[error] java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:176)
[error] scala.tools.nsc.classpath.JrtClassPath.asURLs(DirectoryClassPath.scala:216)
[error] scala.tools.nsc.classpath.AggregateClassPath.$anonfun$asURLs$1(AggregateClassPath.scala:63)
[error] scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:118)
[error] scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:105)

and I wonder if JDK13 introduced a breaking change.

@ignasi35 You are right!
Is a problem with JDK 13.
I downgraded to JDK 11. and it builds and run.

The problem is when trying to compile using the JDK 13.
I've tried some different scenarios as is explained bellow (with logs):

I'll close this issue since JDK13 is not a supported platform yet.

Ok. Thank you.
Is it on the roadmap?

We'll probably target the next LTS after Java 11, which is Java 17 in September 2021.