NoClassDefFoundError: scala/Option on Scala Console startup

Whenever I try to run the Scala Console in my current project, the process terminates after about a half second with the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: scala/Option
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.ClassNotFoundException: scala.Option
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 3 more

Process finished with exit code 1


The weird thing is that the Scala Console runs perfectly fine in a different project. I'm on Scala 2.9.0.1 and 64-bit Windows 7. Thanks for your time.
0
11 comments

I need all output from console (it includes command line).
One more question, is your project contains modules without Scala?

Best regards,
Alexander Podkhalyuzin.

0

It's pretty clutted with library references, but here you go:

"C:\Program Files\Java\jdk1.6.0_23\bin\java" -Djline.terminal=NONE -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 11.0\bin" -Dfile.encoding=windows-1252 -classpath "C:\Users\hellochar\.IdeaIC11\config\plugins\Scala\lib\scala-plugin-runners.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 11.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.compiler.rt.ConsoleRunner -classpath "C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/peasycam/library/PeasyCam.jar;C:/Users/hellochar/Documents/dev/scala-2.9.0.1/lib/scala-dbc.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/simutils/library/simutils.jar;C:/Users/hellochar/Documents/dev/Projects/generative-art/classes/production/sketches;C:/Program Files/Java/jdk1.6.0_23/jre/lib/javaws.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/jsse.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/volumeutils/library/volumeutils.jar;C:/Users/hellochar/Documents/dev/Processing/processing/modes/java/libraries/opengl/library/jogl.jar;C:/Users/hellochar/Documents/dev/scala-2.9.0.1/lib/scala-swing.jar;C:/Users/hellochar/Documents/dev/Projects/Zhang/dist/Zhang.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/ocd/library/ocd.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/plugin.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/ext/gluegen-rt.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/jce.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/resources.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/alt-string.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/toxiclibscore/library/toxiclibscore.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/verletphysics/library/verletphysics.jar;C:/Users/hellochar/Documents/dev/Projects/generative-art/classes/test/sketches;C:/Users/hellochar/Documents/dev/Processing/processing/modes/java/libraries/opengl/library/opengl.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/proscene/library/proscene.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/datautils/library/datautils.jar;C:/Users/hellochar/Documents/dev/Processing/processing/modes/java/libraries/opengl/library/gluegen-rt.jar;C:/Users/hellochar/Documents/dev/scala-2.9.0.1/Misc.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/rt.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/ext/localedata.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/ext/dnsns.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/management-agent.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/ext/sunjce_provider.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/toxiclibs_p5/library/toxiclibs_p5.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/audioutils/library/joal.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/colorutils/library/colorutils.jar;C:/Users/hellochar/Documents/dev/scala-2.9.0.1/lib/scala-compiler.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/ext/jogl.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/alt-rt.jar;C:/Users/hellochar/Documents/dev/Java/lwjgl-2.8.2/jar/lwjgl_util.jar;C:/Users/hellochar/Documents/dev/scala-2.9.0.1/lib/scala-library.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/audioutils/library/audioutils.jar;C:/Users/hellochar/Documents/dev/Processing/sketches/libraries/audioutils/library/gluegen-rt.jar;C:/Users/hellochar/Documents/dev/Java/lwjgl-2.8.2/jar/lwjgl.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/charsets.jar;C:/Program Files/Java/jdk1.6.0_23/jre/lib/deploy.jar;C:/Users/hellochar/Documents/dev/Processing/processing/lib/core.jar;;"
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Option
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.ClassNotFoundException: scala.Option
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 ... 3 more

Process finished with exit code 1



My project used to contain non-Scala modules but I have since deleted those modules.
0

Ok, thank you very much. I reproduced your problem.
This is bug of getting settings from scala facet.
Use following workaround before I'll fix it:
Open facet, choose "Use ordinary compiler", and then setup it. Then choose apply button.
After that open facet again and choose "Use project FSC".
After that everything should work as expected.

Best regards,
Alexander Podkhalyuzin.

0

That is fixed now.

Best regards,
Alexander Podkhalyuzin.

0

The workaround worked for me too, thank you. Looking forward to the nighly build.

By the way. The Scala console is amazing!
I used it for the last time over a year ago and I am more than pleasantly surprised :)

0

I'm getting this error in a much later version.  Intellij 13.0.1 with Scala plugin 0.26.335.  Is there something different that would cause the error?

Thanks,
Nathaniel

/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Djline.terminal=NONE -Didea.launcher.port=7536 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13.app/bin" -Dfile.encoding=UTF-8 -classpath "/Users/nnovod/Library/Application Support/IntelliJIdea13/Scala/lib/scala-plugin-runners.jar:/Applications/IntelliJ IDEA 13.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.compiler.rt.ConsoleRunner -classpath /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jconsole.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-util/jars/spray-util-1.2.0.jar:/Users/nnovod/.ivy2/cache/org.mongodb/casbah-core_2.10/jars/casbah-core_2.10-2.6.2.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/alt-rt.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-util/bundles/spray-util-1.2.0.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-client/jars/spray-client-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/Users/nnovod/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/deploy.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-client/bundles/spray-client-1.2.0.jar:/Users/nnovod/.ivy2/cache/com.typesafe/config/bundles/config-1.0.2.jar:/Users/nnovod/LIMStales/target/scala-2.10/test-classes:/Users/nnovod/.ivy2/cache/org.jfree/jcommon/jars/jcommon-1.0.17.jar:/Users/nnovod/.ivy2/cache/org.specs2/scalaz-core_2.10/jars/scalaz-core_2.10-7.0.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/sa-jdi.jar:/Users/nnovod/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.5.jar:/Users/nnovod/.ivy2/cache/com.chuusai/shapeless_2.10/jars/shapeless_2.10-1.2.4.jar:/Users/nnovod/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.0.jar:/Users/nnovod/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.1.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/javaws.jar:/Users/nnovod/.ivy2/cache/bouncycastle/bcmail-jdk14/jars/bcmail-jdk14-138.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-httpx/bundles/spray-httpx-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/Users/nnovod/.ivy2/cache/com.typesafe/config/jars/config-1.0.2.jar:/Users/nnovod/.ivy2/cache/org.mongodb/mongo-java-driver/jars/mongo-java-driver-2.11.2.jar:/Users/nnovod/.ivy2/cache/commons-lang/commons-lang/jars/commons-lang-2.6.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/management-agent.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-http/jars/spray-http-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/dt.jar:/Users/nnovod/.ivy2/cache/com.typesafe.akka/akka-actor_2.10/jars/akka-actor_2.10-2.2.3.jar:/Users/nnovod/.ivy2/cache/org.scala-lang/scala-actors/jars/scala-actors-2.10.0.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-http/bundles/spray-http-1.2.0.jar:/Users/nnovod/.ivy2/cache/com.typesafe.akka/akka-testkit_2.10/bundles/akka-testkit_2.10-2.2.3.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-can/jars/spray-can-1.2.0.jar:/Users/nnovod/.ivy2/cache/org.apache.poi/poi/jars/poi-3.9.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-httpx/jars/spray-httpx-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-can/bundles/spray-can-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/Users/nnovod/.ivy2/cache/org.mongodb/casbah-commons_2.10/jars/casbah-commons_2.10-2.6.2.jar:/Users/nnovod/.ivy2/cache/org.parboiled/parboiled-core/bundles/parboiled-core-1.1.6.jar:/Users/nnovod/.ivy2/cache/com.typesafe.akka/akka-testkit_2.10/jars/akka-testkit_2.10-2.2.3.jar:/Users/nnovod/.ivy2/cache/org.specs2/specs2_2.10/jars/specs2_2.10-1.14.jar:/Users/nnovod/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.2.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-routing/bundles/spray-routing-1.2.0.jar:/Users/nnovod/.ivy2/cache/org.specs2/scalaz-effect_2.10/jars/scalaz-effect_2.10-7.0.0.jar:/Users/nnovod/.ivy2/cache/dom4j/dom4j/jars/dom4j-1.6.1.jar:/Users/nnovod/.ivy2/cache/org.apache.poi/poi-ooxml/jars/poi-ooxml-3.9.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-testkit/jars/spray-testkit-1.2.0.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-json_2.10/jars/spray-json_2.10-1.2.5.jar:/Users/nnovod/.sbt/boot/scala-2.10.3/lib/scala-library.jar:/Users/nnovod/.ivy2/cache/com.googlecode.concurrentlinkedhashmap/concurrentlinkedhashmap-lru/jars/concurrentlinkedhashmap-lru-1.3.2.jar:/Users/nnovod/LIMStales/target/scala-2.10/classes:/Users/nnovod/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.1.6.jar:/Users/nnovod/.ivy2/cache/org.parboiled/parboiled-scala_2.10/jars/parboiled-scala_2.10-1.1.6.jar:/Users/nnovod/.ivy2/cache/bouncycastle/bcprov-jdk14/jars/bcprov-jdk14-138.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/Users/nnovod/.ivy2/cache/org.parboiled/parboiled-scala_2.10/bundles/parboiled-scala_2.10-1.1.6.jar:/Users/nnovod/.ivy2/cache/org.specs2/specs2-scalaz-concurrent_2.10/jars/specs2-scalaz-concurrent_2.10-7.0.0.jar:/Users/nnovod/.ivy2/cache/org.apache.xmlbeans/xmlbeans/jars/xmlbeans-2.3.0.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-io/jars/spray-io-1.2.0.jar:/Users/nnovod/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.3.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/Users/nnovod/.ivy2/cache/io.spray/spray-io/bundles/spray-io-1.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar:/Users/nnovod/.ivy2/cache/org.apache.poi/poi-ooxml-schemas/jars/poi-ooxml-schemas-3.9.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/Users/nnovod/.ivy2/cache/org.specs2/specs2-scalaz-core_2.10/jars/specs2-scalaz-core_2.10-7.0.0.jar:/Users/nnovod/.ivy2/cache/com.lowagie/itext/jars/itext-2.1.5.jar:/Users/nnovod/.ivy2/cache/org.mongodb/casbah-gridfs_2.10/jars/casbah-gridfs_2.10-2.6.2.jar:/Users/nnovod/.ivy2/cache/com.github.nscala-time/nscala-time_2.10/jars/nscala-time_2.10-0.2.0.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/Users/nnovod/.ivy2/cache/org.mongodb/casbah-query_2.10/jars/casbah-query_2.10-2.6.2.jar:/Users/nnovod/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.6.0.jar:/Users/nnovod/.ivy2/cache/org.jfree/jfreechart/jars/jfreechart-1.0.15.jar:/Users/nnovod/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar:/Users/nnovod/.ivy2/cache/org.scalatest/scalatest_2.10/jars/scalatest_2.10-1.9.1.jar: -usejavacp
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Option
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.ClassNotFoundException: scala.Option
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 3 more

Process finished with exit code 1

0

I did a clean rebuild via sbt and changed the project modules to use the scala version (2.10.3) that was being used elsewhere and now the console starts up.  I can't say I'm clear on exactly what fixed things but I'm happy now.

Thanks,
Nathaniel

0

Probably scala-library was missed on your disk that time? Unfortunately I don't have any other answer what was wrong, because I can see scala-library in console classpath.

Best regards,
Alexander Podkhalyuzin.

0

Hello. I'm completely new to Scala and I'm getting this same error in IntelliJ IDEA 14.0.2, Scala plugin 1.2.1. I'm trying to run a simple ScalaTest. Here's what I've tried, from scratch:

o Create a new Scala project. In my case it's using a Global Library that IntelliJ had set up for me - scala-sdk-2.11.4 - which it apparently put under ~/.ivy2

o Download scalatest_2.11-2.2.1.jar into the project's root and add it to the module's dependencies: https://oss.sonatype.org/content/groups/public/org/scalatest/scalatest_2.11/2.2.1/scalatest_2.11-2.2.1.jar

o Make a directory called test alongside src, and mark it as Test Sources Root.

o In test: New > Scala class named SetSuite. Edit it to contain:

import org.scalatest.FunSuite
class SetSuite extends FunSuite {
  test("some test") {
    assert(0 == 1)
  }
}


o Right click on the file and 'Run > SetSuite'

I get the error:

An exception or error caused a run to abort. This may have been caused by a problematic custom reporter.
java.lang.NoClassDefFoundError: scala/xml/MetaData


Any help would be great. Here's the full output:

/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/cornell/Library/Application Support/IntelliJIdea14/Scala/lib/scala-plugin-runners.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/deploy.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/javaws.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/plugin.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/charsets.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/classes.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/jsse.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/ui.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/ext/apple_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/cornell/Downloads/scala-test/out/test/scala-test:/Users/cornell/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.4.jar:/Users/cornell/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.4.jar:/Users/cornell/Downloads/scala-test/scalatest_2.11-2.2.1.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner -s SetSuite -showProgressMessages true -C org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestReporter
Testing started at 2:51 PM ...
An exception or error caused a run to abort. This may have been caused by a problematic custom reporter.
java.lang.NoClassDefFoundError: scala/xml/MetaData
    at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2581)
    at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044)
    at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043)
    at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722)
    at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043)
    at org.scalatest.tools.Runner$.run(Runner.scala:883)
    at org.scalatest.tools.Runner.run(Runner.scala)
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2(ScalaTestRunner.java:137)
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: scala.xml.MetaData
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 14 more

EOF

0

Hello.

It is very likely that the error you are seing is caused by lack of scala-xml jar in your module's dependencies. It is required to run ScalaTest suites.

You can download it manually from here: https://oss.sonatype.org/content/groups/public/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar. (notice that you also might need junit and hamcrest, these are not included as well)
Or use maven or sbt to download ScalaTest with all dependencies automatically (POM file and sbt dependencies are available at ScalaTest website here: http://www.scalatest.org/download), that should pull scala-xml as well.

With best regards,
Roman.

0

Thank you, Roman. I downloaded Scala directly rather than relying on the automatically-downloaded on that IDEA grabbed. Apparently the former contains the extra jars.

0

Please sign in to leave a comment.