java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to scala.collection.immutable.Map

GitHub | ligadata-ahmad | 5 months ago
  1. 0

    remove engine config fails if I pass the clusterConfig.json

    GitHub | 5 months ago | ligadata-ahmad
    java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to scala.collection.immutable.Map
  2. 0

    Updating an app's constraints results in `500`

    GitHub | 3 years ago | ConnorDoyle
    java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to mesosphere.marathon.Protos$Constraint
  3. 0

    [ScalaCLPlugin] ClassCastException when using map with breakOut

    GitHub | 5 years ago | ochafik
    java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to scala.collection.immutable.Set
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    top(num: Int) method applied to a VertexRDD

    Google Groups | 3 years ago | Andres Perez
    java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to org.apache.spark.util.BoundedPriorityQueue
  6. 0

    {code} scala> val test = testcollections.testcoll test: com.mongodb.casbah.MongoCollection = testtest scala> import com.mongodb.casbah.Imports._ import com.mongodb.casbah.Imports._ scala> test.save(MongoDBObject("list" -> List("one", "two", "three"))) // save a list to mongodb res1: com.mongodb.WriteResult = N/A scala> val o = test.findOne.get // get back the thing we just saved o: test.T = { "_id" : { "$oid" : "52f559c63004ae5f4863ef4e"} , "list" : [ "one" , "two" , "three"]} scala> o.getAs[MongoDBList]("list") // get the list out res2: Option[com.mongodb.casbah.Imports.MongoDBList] = Some([ "one" , "two" , "three"]) scala> o.getAs[MongoDBList]("list").get.toList // turn it from Option[MongoDBList] to a scala List[Any] res3: List[Any] = List(one, two, three) scala> o.getAs[MongoDBList]("list").map(_.toList) // same thing, but use map so we get an Option[List[Any]] res8: Option[List[Any]] = Some(List(one, two, three)) scala> o += "list" -> List("one", "two", "three") // set the "list" again, the same way we did before res4: com.mongodb.casbah.commons.MongoDBObject = { "_id" : { "$oid" : "52f559c63004ae5f4863ef4e"} , "list" : [ "one" , "two" , "three"]} scala> o.getAs[MongoDBList]("list") // get the list out again res5: Option[com.mongodb.casbah.Imports.MongoDBList] = Some(List(one, two, three)) scala> o.getAs[MongoDBList]("list").get.toList // same thing we did before ... works fine. res6: List[Any] = List(one, two, three) scala> o.getAs[MongoDBList]("list").map(_.toList) // same thing we did before ... DOH! java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to com.mongodb.casbah.commons.MongoDBList at $anonfun$1.apply(<console>:15) at scala.Option.map(Option.scala:145) at .<init>(<console>:15) at .<clinit>(<console>) at .<init>(<console>:7) at .<clinit>(<console>) at $print(<console>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734) at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983) at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568) at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:756) at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:801) at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:713) at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:577) at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:584) at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:587) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:878) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135) at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:833) at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:900) at xsbt.ConsoleInterface.run(ConsoleInterface.scala:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102) at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:77) at sbt.Console.sbt$Console$$console0$1(Console.scala:23) at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24) at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:24) at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:24) at sbt.Logger$$anon$4.apply(Logger.scala:90) at sbt.TrapExit$App.run(TrapExit.scala:244) at java.lang.Thread.run(Thread.java:722) {code}

    JIRA | 3 years ago | Brandon Hudgeons
    java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to com.mongodb.casbah.commons.MongoDBList

    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.ClassCastException

      scala.collection.immutable.$colon$colon cannot be cast to scala.collection.immutable.Map

      at com.ligadata.MetadataAPI.ConfigUtils$$anonfun$UploadModelsConfig$1.apply()
    2. com.ligadata.MetadataAPI
      ConfigUtils$$anonfun$UploadModelsConfig$1.apply
      1. com.ligadata.MetadataAPI.ConfigUtils$$anonfun$UploadModelsConfig$1.apply(ConfigUtils.scala:630)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      2. com.ligadata.MetadataAPI.ConfigUtils$$anonfun$UploadModelsConfig$1.apply(ConfigUtils.scala:628)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      2 frames
    3. Scala
      MapLike$DefaultKeySet.foreach
      1. scala.collection.Iterator$class.foreach(Iterator.scala:742)[ExtDependencyLibs2_2.11-1.5.0.jar:1.0]
      2. scala.collection.AbstractIterator.foreach(Iterator.scala:1194)[ExtDependencyLibs2_2.11-1.5.0.jar:1.0]
      3. scala.collection.MapLike$DefaultKeySet.foreach(MapLike.scala:174)[ExtDependencyLibs2_2.11-1.5.0.jar:1.0]
      3 frames
    4. com.ligadata.MetadataAPI
      StartMetadataAPI.main
      1. com.ligadata.MetadataAPI.ConfigUtils$.UploadModelsConfig(ConfigUtils.scala:628)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      2. com.ligadata.MetadataAPI.MetadataAPIImpl$.UploadModelsConfig(MetadataAPIImpl.scala:3973)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      3. com.ligadata.MetadataAPI.Utility.ConfigService$.removeEngineConfig(ConfigService.scala:173)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      4. com.ligadata.MetadataAPI.StartMetadataAPI$.route(StartMetadataAPI.scala:665)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      5. com.ligadata.MetadataAPI.StartMetadataAPI$.main(StartMetadataAPI.scala:354)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      6. com.ligadata.MetadataAPI.StartMetadataAPI.main(StartMetadataAPI.scala)[KamanjaInternalDeps_2.11-1.5.0.jar:0.1-SNAPSHOT]
      6 frames