You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ranjit <ra...@amazon.com> on 2016/08/15 01:35:58 UTC
IncompatibleClassChange error in Java/Spark/Ignite program
I'm running into an class change error while running my Java program. I think
my maven versions are okay. Any ideas in the group about what's off here?
JAR VERSIONS
===========
spark-core_2.10 : 2.0.0
ignite-core : 1.7.0
ignite-spring : 1.7.0
ignite-spark : 1.7.0
ERROR
=========
>>> VM name: 17754@MacBook-Pro.local
>>> Local node [ID=898BC368-B376-4529-8785-65C8AADD92F9, order=10,
>>> clientMode=true]
>>> Local node addresses: [10.85.223.11/0:0:0:0:0:0:0:1, /10.85.223.11,
>>> /127.0.0.1]
>>> Local ports: TCP:11211 TCP:47100 UDP:47400 TCP:48100
16/08/14 18:30:59 INFO GridDiscoveryManager: Topology snapshot [ver=10,
servers=1, clients=1, CPUs=12, heap=4.6GB]
Exception in thread "main" java.lang.IncompatibleClassChangeError:
Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:97)
at
org.apache.ignite.spark.JavaIgniteContext.<init>(JavaIgniteContext.scala:42)
at
org.apache.ignite.spark.JavaIgniteContext.<init>(JavaIgniteContext.scala:45)
at
org.apache.ignite.spark.JavaIgniteContext.<init>(JavaIgniteContext.scala:49)
at client.SparkIgniteClient.main(SparkIgniteClient.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by vkulichenko <va...@gmail.com>.
Hi Ranijt,
I created a ticket for this:
https://issues.apache.org/jira/browse/IGNITE-3710. Hopefully someone in the
community will pick it up.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7155.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by Ranjit <ra...@amazon.com>.
Hi Val,
That worked!
Is Spark 1.5.2 the recommended version to use with Ignite 1.7.0?
We want to be at Spark 2.0.0, so what should be our next steps in
determining why Ignite 1.7.0 isn't working with Spark 2.0.0 for us?
Are you guys able to try this out and let us know if it is something on our
end or if this is genuinely an issue?
Thanks,
Ranjit
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7141.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by vkulichenko <va...@gmail.com>.
Ranjit,
Looks like this is because you using Spark 2.0.0, while Ignite module is
based on 1.5.2 for now. Can you try with 1.5.2 and check if it helps?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7110.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by Ranjit <ra...@amazon.com>.
Hi Val,
Really appreciate your responses.
I did the following things but still see the error:
1. In IntelliJ, removed all dependent JARs
2. Deleted the ~/.m2/repository (local maven repo)
3. Reimported the POM.xml
4. Ran the program in debug, put breakpoints, inspected that the class
definitions for Spark and Ignite are coming from 2.10
/Users/ranjiti/.m2/repository/org/apache/spark/spark-core_2.10/2.0.0/spark-core_2.10-2.0.0.jar!/org/apache/spark/SparkConf.class
/Users/ranjiti/.m2/repository/org/apache/ignite/ignite-spark_2.10/1.7.0/ignite-spark_2.10-1.7.0.jar!/org/apache/ignite/spark/JavaIgniteContext.class
I'm still seeing the same error :(
16/08/16 10:42:13 INFO BlockManagerMaster: Registered BlockManager
BlockManagerId(driver, 10.44.9.134, 64386)
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/spark/Logging
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7107.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by vkulichenko <va...@gmail.com>.
Ranjit,
Are you sure that you reimported and rebuilt you project against these
artifacts? The Logging class is actually the difference between 2.10 and
2.11. ignite-spark_2.10 doesn't have the references of this class, while
ignite-spark_2.12 has.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7083.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by Ranjit <ra...@amazon.com>.
Hi Val,
I'm running into a NoClassDefFound error now.
<artifactId>spark-core_2.10</artifactId>
<version>2.0.0</version>
<artifactId>ignite-core</artifactId>
<version>1.7.0</version>
<artifactId>ignite-spring</artifactId>
<version>1.7.0</version>
<artifactId>ignite-spark_2.10</artifactId>
<version>1.7.0</version>
<code>
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/spark/Logging
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
org.apache.ignite.spark.JavaIgniteContext.<init>(JavaIgniteContext.scala:42)
at client.SparkIgniteClient.main(SparkIgniteClient.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.Logging
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
</code>
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7081.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IncompatibleClassChange error in Java/Spark/Ignite program
Posted by vkulichenko <va...@gmail.com>.
Hi Ranjit,
ignite-spark module depends on spark-core_2.11. If you have to use
spark-core_2.10, there is a special ignite-spark_2.10 module.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IncompatibleClassChange-error-in-Java-Spark-Ignite-program-tp7053p7074.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.