1

The problem

Using Scala IDE, I've been getting a cryptic NullPointerException wherein the classed underneath "src/test/scala" are not found... My IDE Details are :

Related

A related question (see http://www.stackoverflow.com/questions/9686517/scala-eclipse-plugin-java-lang-classnotfoundexception) was answered some time (2 years ago), but it appears I'm seeing the same error in new ScalaIDE (downloaded for 2.10, just a week ago).

System Details and stacktrace

eclipse.buildId=3.0.3-20140327-1716-Typesafe
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/bigpetstore/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/bigpetstore    /.eclipse_keyring -showlocation

And the exception is as follows

java.lang.NullPointerException
    at scala.collection.convert.Wrappers$JEnumerationWrapper.hasNext(Wrappers.scala:46)
    at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
    at scala.collection.Iterator$class.toStream(Iterator.scala:1143)
    at scala.collection.AbstractIterator.toStream(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toIterable(TraversableOnce.scala:259)
    at scala.collection.AbstractIterator.toIterable(Iterator.scala:1157)
    at scala.tools.eclipse.ScalaPlugin.sbtCompilerInterface$lzycompute(ScalaPlugin.scala:177)
    at scala.tools.eclipse.ScalaPlugin.sbtCompilerInterface(ScalaPlugin.scala:177)
    at scala.tools.eclipse.buildmanager.sbtintegration.SbtInputs$$anon$5.scalac(SbtInputs.scala:71)
    at scala.tools.eclipse.buildmanager.sbtintegration.SbtInputs$$anon$5.scalac(SbtInputs.scala:63)
    at sbt.compiler.IC$.compile(IncrementalCompiler.scala:21)
    at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:133)
    at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:124)
    at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:178)
    at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:666)
    at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:119)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
jayunit100
  • 17,388
  • 22
  • 92
  • 167

1 Answers1

1

Oddly, I was actually able to fix this, by simply switching from SBT to the refined compiler: enter image description here

Any thoughts on why the SBT compiler would work but "refined" would fail, I'd like to hear.

There are some related threads, but no definitive answer (yet) that i can see about why it is that SBT would throw an NPE when compiling. Could just be an accidental error or bug in the plugin itslef that I was triggering.

https://groups.google.com/forum/#!msg/scala-ide-user/Tscp9sLixJI/a52OR068dYAJ https://groups.google.com/forum/#!msg/scala-ide-user/H3ov9hBt5aA/uctURBzV2JwJ

jayunit100
  • 17,388
  • 22
  • 92
  • 167