Inconsistent constant pool data in classfile
Asked Answered
A

1

6

I am trying to use spark cassandra connector to fetch values from the table. The load() yields the IncompatibleClassChangeError. My development environment is defined as follows,
Intellij : 2019.3.2
Scala version : 2.12.10
Scala binary version : 2.12
Spark version : 2.4.4
Spark cassandra connector : 2.4.2
Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class com/datastax/spark/connector/cql/StructDef. Method 'java.lang.Object $anonfun$missingColumns$1$adapted(com.datastax.spark.connector.cql.StructDef, com.datastax.spark.connector.ColumnRef)' at index 182 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef Which libraries creates the exception?

Albumin answered 30/1, 2020 at 12:24 Comment(3)
I suspect that it pulled cassandra connector compiled for 2.11Gawk
please add the exact maven coordinates for this dependency....Gawk
may be there are jar conflicts, when I use presto, I face the same problem, I found out that presto-jdbc and prestodb-jdbc are both on the classpathEnsoul
U
0

I encountered same issue with loading data from the Cassandra version 4 by using the Spark 3.1.3 and the Scala 2.12 and the Java 17.

My issue resolved by reducing version of Java to 8.

Unthinkable answered 12/2 at 10:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.