java.lang.NoSuchMethodError: com.datastax.driver.core.KeyspaceMetadata.getMaterializedViews()Ljava/util/Collection;

Stack Overflow | Satya | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spark Cassandra Java Connection NoSuchMethodError or NoClassDefFoundError

    Stack Overflow | 8 months ago | Satya
    java.lang.NoSuchMethodError: com.datastax.driver.core.KeyspaceMetadata.getMaterializedViews()Ljava/util/Collection;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.datastax.driver.core.KeyspaceMetadata.getMaterializedViews()Ljava/util/Collection;

      at com.datastax.spark.connector.cql.Schema$.com$datastax$spark$connector$cql$Schema$$fetchTables$1()
    2. spark-cassandra-connector
      Schema$$anonfun$com$datastax$spark$connector$cql$Schema$$fetchKeyspaces$1$2.apply
      1. com.datastax.spark.connector.cql.Schema$.com$datastax$spark$connector$cql$Schema$$fetchTables$1(Schema.scala:281)
      2. com.datastax.spark.connector.cql.Schema$$anonfun$com$datastax$spark$connector$cql$Schema$$fetchKeyspaces$1$2.apply(Schema.scala:305)
      3. com.datastax.spark.connector.cql.Schema$$anonfun$com$datastax$spark$connector$cql$Schema$$fetchKeyspaces$1$2.apply(Schema.scala:304)
      3 frames
    3. Scala
      TraversableLike$WithFilter.map
      1. scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:683)
      2. scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:316)
      3. scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:972)
      4. scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:972)
      5. scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:682)
      5 frames
    4. spark-cassandra-connector
      CassandraTableScanRDD.getPartitions
      1. com.datastax.spark.connector.cql.Schema$.com$datastax$spark$connector$cql$Schema$$fetchKeyspaces$1(Schema.scala:304)
      2. com.datastax.spark.connector.cql.Schema$$anonfun$fromCassandra$1.apply(Schema.scala:325)
      3. com.datastax.spark.connector.cql.Schema$$anonfun$fromCassandra$1.apply(Schema.scala:322)
      4. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withClusterDo$1.apply(CassandraConnector.scala:122)
      5. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withClusterDo$1.apply(CassandraConnector.scala:121)
      6. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withSessionDo$1.apply(CassandraConnector.scala:111)
      7. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withSessionDo$1.apply(CassandraConnector.scala:110)
      8. com.datastax.spark.connector.cql.CassandraConnector.closeResourceAfterUse(CassandraConnector.scala:140)
      9. com.datastax.spark.connector.cql.CassandraConnector.withSessionDo(CassandraConnector.scala:110)
      10. com.datastax.spark.connector.cql.CassandraConnector.withClusterDo(CassandraConnector.scala:121)
      11. com.datastax.spark.connector.cql.Schema$.fromCassandra(Schema.scala:322)
      12. com.datastax.spark.connector.cql.Schema$.tableFromCassandra(Schema.scala:342)
      13. com.datastax.spark.connector.rdd.CassandraTableRowReaderProvider$class.tableDef(CassandraTableRowReaderProvider.scala:50)
      14. com.datastax.spark.connector.rdd.CassandraTableScanRDD.tableDef$lzycompute(CassandraTableScanRDD.scala:60)
      15. com.datastax.spark.connector.rdd.CassandraTableScanRDD.tableDef(CassandraTableScanRDD.scala:60)
      16. com.datastax.spark.connector.rdd.CassandraTableRowReaderProvider$class.verify(CassandraTableRowReaderProvider.scala:137)
      17. com.datastax.spark.connector.rdd.CassandraTableScanRDD.verify(CassandraTableScanRDD.scala:60)
      18. com.datastax.spark.connector.rdd.CassandraTableScanRDD.getPartitions(CassandraTableScanRDD.scala:232)
      18 frames
    5. Spark
      RDD$$anonfun$partitions$2.apply
      1. org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:248)
      2. org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:246)
      2 frames
    6. Scala
      Option.getOrElse
      1. scala.Option.getOrElse(Option.scala:121)
      1 frame
    7. Spark
      AbstractJavaRDDLike.foreach
      1. org.apache.spark.rdd.RDD.partitions(RDD.scala:246)
      2. org.apache.spark.SparkContext.runJob(SparkContext.scala:1911)
      3. org.apache.spark.rdd.RDD$$anonfun$foreach$1.apply(RDD.scala:875)
      4. org.apache.spark.rdd.RDD$$anonfun$foreach$1.apply(RDD.scala:873)
      5. org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
      6. org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
      7. org.apache.spark.rdd.RDD.withScope(RDD.scala:358)
      8. org.apache.spark.rdd.RDD.foreach(RDD.scala:873)
      9. org.apache.spark.api.java.JavaRDDLike$class.foreach(JavaRDDLike.scala:350)
      10. org.apache.spark.api.java.AbstractJavaRDDLike.foreach(JavaRDDLike.scala:45)
      10 frames
    8. com.initech.myapp
      MySparkApp.run
      1. com.initech.myapp.cassandra.service.CassandraDataService.getMatches(CassandraDataService.java:45)
      2. com.initech.myapp.processunit.MySparkApp.receive(MySparkApp.java:120)
      3. com.initech.myapp.processunit.MySparkApp.process(MySparkApp.java:61)
      4. com.initech.myapp.processunit.MySparkApp.run(MySparkApp.java:144)
      4 frames
    9. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:789)
      2. org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:779)
      3. org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:769)
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
      6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
      6 frames
    10. com.initech.myapp
      MySparkAppBootApp.main
      1. com.initech.myapp.MySparkAppBootApp.main(MyAppProcessingUnitsApplication.java:20)
      1 frame
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    12. Spring Boot Loader
      JarLauncher.main
      1. org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
      2. org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
      3. org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
      4. org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)
      4 frames
    13. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    14. Spark
      DriverWrapper.main
      1. org.apache.spark.deploy.worker.DriverWrapper$.main(DriverWrapper.scala:58)
      2. org.apache.spark.deploy.worker.DriverWrapper.main(DriverWrapper.scala)
      2 frames