Open aminaaslam opened 7 years ago
Which version of Spark & Scala & Log4J are you using?
I am using Spark 2.0.2, scala.version "2.11" and slf4j-log4j12-1.7.16
Any help in this regard would be very helpful. Can someone guide me as to why i am getting this error.
You have a mismatched version of Spark and Spark testing base, if the logging classes (or log4j versions) has changed at all between 2.0.0 and 2.0.2 that would explain the exception. Can you try this with a matching version?
I am getting a same kind of error but not able to figure out what the actual cause is. In my case the version is correct though (I think).
I met the same problem. I put spark-testing-basing in the first of my dependencies. I do not know why this could solve this problem, but it worked for me. Hope that could help somebody.
I am still getting this in the latest version. All my versions match so I think it must be something else. These are the relevant library dependencies:
libraryDependencies += "com.holdenkarau" %% "spark-testing-base" % "3.1.2_1.1.0" % "test",
libraryDependencies += "org.apache.spark" %% "spark-core" % "3.1.2" % "provided",
libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.1.2" % "provided",
libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.9",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.9" % "test",
I am getting this error while running a very simple unit test case. using these versions spark-testing-base_2.10.version "2.0.0_0.4.7"
This problem occurs on this line // Run the assertions on the result and expected JavaRDDComparisons.assertRDDEquals( JavaRDD.fromRDD(JavaPairRDD.toRDD(result), tag), JavaRDD.fromRDD(JavaPairRDD.toRDD(expectedRDD), tag)); I am aware of this issue ScalaTest 3.0.0 Support #137 but it am not using ScalaTest
java.lang.IncompatibleClassChangeError at org.apache.spark.internal.Logging$class.$init$(Logging.scala:35) at com.holdenkarau.spark.testing.Utils$.(Utils.scala:33)
at com.holdenkarau.spark.testing.Utils$.(Utils.scala)
at com.holdenkarau.spark.testing.JavaRDDComparisons$.compareRDD(JavaRDDComparisons.scala:41)
at com.holdenkarau.spark.testing.JavaRDDComparisons$.assertRDDEquals(JavaRDDComparisons.scala:29)
at com.holdenkarau.spark.testing.JavaRDDComparisons.assertRDDEquals(JavaRDDComparisons.scala)
at com.baesystems.ai.analytics.util.RDDUtilTest.verifyHistogramTest(RDDUtilTest.java:52)
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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)