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

JDK 11 produces a Null Pointer Exception #1346

Closed
athersharif opened this issue Nov 28, 2018 · 2 comments
Closed

JDK 11 produces a Null Pointer Exception #1346

athersharif opened this issue Nov 28, 2018 · 2 comments
Labels

Comments

@athersharif
Copy link
Collaborator

athersharif commented Nov 28, 2018

JDK 11 produces this error when doing activator run or sbt run:

[info] Loading project definition from /Users/athersharif/dev/SidewalkWebpage/project
java.lang.NullPointerException
    at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
    at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
    at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
    at java.base/java.util.regex.Pattern.matcher(Pattern.java:1133)
    at java.base/java.util.regex.Pattern.split(Pattern.java:1261)
    at java.base/java.util.regex.Pattern.split(Pattern.java:1334)
    at sbt.IO$.pathSplit(IO.scala:727)
    at sbt.IO$.parseClasspath(IO.scala:825)
    at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:64)
    at sbt.compiler.AggressiveCompile.withBootclasspath(AggressiveCompile.scala:51)
    at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:84)
    at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71)
    at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:46)
    at sbt.Compiler$.apply(Compiler.scala:75)
    at sbt.Compiler$.apply(Compiler.scala:66)
    at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:770)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[error] (compile:compile) java.lang.NullPointerException

Switching to JDK 8 solves this. Worth investigating and fixing this as folks new to the project may have the newer version of JDK.

@misaugstad
Copy link
Member

According to Scala documentation Java 9 and 10 require Scala 2.12.4+, 2.11.12+, or 2.10.7+. We are currently using 2.10.4. I am in the process of updating the libraries and such that we use (#1258) and hope update our version of Scala at that time as well, which should solve this!

@athersharif
Copy link
Collaborator Author

@misaugstad ah, makes sense. can certainly review the pr against this bug once it's ready :)

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

No branches or pull requests

3 participants