question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

source code example install java crash

See original GitHub issue

Problem: When trying to install the example code for the FP in Scala it fails.

NOTE: issue 548 looks similar, but is closed. It blames the problem on ‘sbt’. I am running the lastest sbt I can find for the mac.

I am new to scala and java. Lots of C++ and ruby in my background.

The only reason I was installing the examples is because code in the book did not run without a definition of Cons() for work with Lists and I hoped the install would provide a definition.

Environment My computer is a Mac book pro running Sierra 10.12.6 sbt version is 1.2.8 scala -version * Scala code runner version 2.11.4 – Copyright 2002-2013, LAMP/EPFL java -version * openjdk 11.0.1 2018-10-16 * OpenJDK Runtime Environment 18.9 (build 11.0.1+13) * OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Here’s a log of the problem:

% rm -rf ~/.sbt
% git clone https://github.com/fpinscala/fpinscala.git
Cloning into 'fpinscala'...
remote: Enumerating objects: 3052, done.
remote: Total 3052 (delta 0), reused 0 (delta 0), pack-reused 3052
Receiving objects: 100% (3052/3052), 5.01 MiB | 7.01 MiB/s, done.
Resolving deltas: 100% (944/944), done.
%  cd fpinscala; ls
LICENSE		answers		project		sbt.bat
README.md	build.sbt	sbt		sbt.cmd
answerkey	exercises	sbt-launch.jar
% chmod +x  ./sbt
% ./sbt
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Getting org.scala-sbt sbt 0.13.13 ...
:: retrieving :: org.scala-sbt#boot-app
	confs: [default]
	50 artifacts copied, 0 already retrieved (17645kB/121ms)
Getting Scala 2.10.6 (for sbt)...
:: retrieving :: org.scala-sbt#boot-scala
	confs: [default]
	5 artifacts copied, 0 already retrieved (24494kB/94ms)
[info] Loading project definition from /Users/davei/fpinscala/project
[info] Updating {file:/Users/davei/fpinscala/project/}fpinscala-build...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by sbt.ivyint.ErrorMessageAuthenticator$ (file:/Users/davei/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.13/ivy-0.13.13.jar) to field java.net.Authenticator.theAuthenticator
WARNING: Please consider reporting this to the maintainers of sbt.ivyint.ErrorMessageAuthenticator$
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cf13e211b2cb31f0d3b317289dca70[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
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:797)
	at sbt.IO$.parseClasspath(IO.scala:912)
	at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:66)
	at sbt.compiler.MixedAnalyzingCompiler$.withBootclasspath(MixedAnalyzingCompiler.scala:188)
	at sbt.compiler.MixedAnalyzingCompiler$.searchClasspathAndLookup(MixedAnalyzingCompiler.scala:166)
	at sbt.compiler.MixedAnalyzingCompiler$.apply(MixedAnalyzingCompiler.scala:176)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:879)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:870)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:868)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	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:compileIncremental) java.lang.NullPointerException
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
> 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lezhangnetcommented, Apr 3, 2019

Try to use JDK 8.

1reaction
daveinmancommented, Jan 4, 2019

Orlando,

Thanks so much for the time you spent replying to me - it’s very thoughtful. I am away from my scala platform, but will try your suggestion as I get back to it.

Dave

David M. Inman 8968 Southwest Joe Court | Tigard, Oregon 97223 | USA Office: +1 (503) 244-1516 Offshore Milling Services | www.offshoremilling.com

On Jan 3, 2019, at 7:44 AM, Orlando Méndez notifications@github.com wrote:

Hi @daveinman , I’m by no means an expert in sbt nor Scala, however I was curious and tried to replicate your bug -albeit in two distinct platforms (i.e. Windows 10, and Ubuntu (16.04.5 LTS)). In both cases I succeded to download and run sbt. What draws my attention from your log above, are the five warnings displayed during the loading of sbt, because I can tell you I did not see those during the same process in the platforms I tried. Maybe it is worth to remove what you have and try once more? Again, I’m neither MacOS user nor Scala expert, but perhaps this link might help you to ensure both sbt & scala are properly installed and configured, prior to cloning this repo. Good luck!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4. Common Errors in installing JDK - Saylor Academy
POSSIBLE SOLUTIONS: 1) Issue a "dir" command to list the contents of the current directory. Check that it contains the Java class to...
Read more >
'Java Not Recognized' Error Fix - TheServerSide.com
Here are three easy ways to fix the 'Java not recognized as an external or external command' error on both Windows and Linux...
Read more >
6 Crashing JVM - Oracle Help Center
9/12. 6 Crashing JVM. A Java application might stop running for several reasons. The most common reason is that the application finished running...
Read more >
How to Resolve the Java Error Code 1603 or Java Update Did ...
One such example is, the user, encountering error code 1603. Basically, there are two ways to install Java – users can choose either...
Read more >
How to Solve the Most Common Runtime Errors in Java | Rollbar
A runtime error in Java is an application error that occurs during the execution of a program. Learn how to solve the most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found