java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class

tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    sbt test gives: java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class"

    Stack Overflow | 5 months ago | KeyboardDrummer
    java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
  2. 0
    samebug tip
    This exception normally means you either have to add the said class to your dependencies or you miswrote it. Look in the documentation of your library how to add it as a dependency.
  3. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    This was caused by a failure to instantiate Kafka broker. Check your dependencies.
  6. 0
    samebug tip
    NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

  1. marcbouvierdav 26 times, last 1 day ago
  2. batwalrus76 12 times, last 2 days ago
  3. musketyr 1 times, last 2 days ago
  4. SteVio1989 4 times, last 3 days ago
  5. andyglick 2 times, last 2 weeks ago
68 more registered users
27 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    scala.collection.GenTraversableOnce$class

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(Unknown Source)
    2. java.lang.ClassLoader.loadClass(Unknown Source)
    3. java.lang.ClassLoader.loadClass(Unknown Source)
    3 frames
  3. scalatest
    Framework.runner
    1. org.scalatest.ConfigMap.<init>(ConfigMap.scala:97)
    2. org.scalatest.tools.Runner$.parsePropertiesArgsIntoMap(Runner.scala:2219)
    3. org.scalatest.tools.Framework.runner(Framework.scala:1026)
    3 frames
  4. SBT
    Defaults$$anonfun$createTestRunners$1.apply
    1. sbt.Defaults$$anonfun$createTestRunners$1.apply(Defaults.scala:547)
    2. sbt.Defaults$$anonfun$createTestRunners$1.apply(Defaults.scala:541)
    2 frames
  5. Scala
    AbstractTraversable.map
    1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    3. scala.collection.immutable.Map$Map2.foreach(Map.scala:130)
    4. scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    5. scala.collection.AbstractTraversable.map(Traversable.scala:105)
    5 frames
  6. SBT
    Defaults$$anonfun$testTasks$4.apply
    1. sbt.Defaults$.createTestRunners(Defaults.scala:541)
    2. sbt.Defaults$.allTestGroupsTask(Defaults.scala:561)
    3. sbt.Defaults$$anonfun$testTasks$4.apply(Defaults.scala:424)
    4. sbt.Defaults$$anonfun$testTasks$4.apply(Defaults.scala:424)
    4 frames
  7. Scala
    Function1$$anonfun$compose$1.apply
    1. scala.Function9$$anonfun$tupled$1.apply(Function9.scala:35)
    2. scala.Function9$$anonfun$tupled$1.apply(Function9.scala:34)
    3. scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    3 frames
  8. SBT
    $tilde$greater$$anonfun$$u2219$1.apply
    1. sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    1 frame
  9. sbt Task system
    Transform$$anon$4.work
    1. sbt.std.Transform$$anon$4.work(System.scala:63)
    1 frame
  10. SBT
    CompletionService$$anon$2.call
    1. sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    2. sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    3. sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    4. sbt.Execute.work(Execute.scala:237)
    5. sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    6. sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    7. sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    8. sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    8 frames
  11. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(Unknown Source)
    2. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    3. java.util.concurrent.FutureTask.run(Unknown Source)
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    6. java.lang.Thread.run(Unknown Source)
    6 frames