deequ icon indicating copy to clipboard operation
deequ copied to clipboard

Not able to run Deequ due to Compatibility, Please help that how I can run it without any issue.

Open anamikasingh-bigdata opened this issue 4 years ago • 1 comments

I have written code for amazon Deequ which is failing due to version issue. In my system Spark 2.4.0 is available, can anyone please suggest that which version of Deequ and Scala, fasterxml etc are compatible to use? I am getting INFO like multiple Scala version detected. I am using Deequ LATEST or tried with some other latest versions too. I am getting multiple version of Scala that may be primary reason of issue. Please help if you can provide the correct pom file and compatible version of all.

Below is the Info, Error and used POM.xml :

[INFO] --- scala-maven-plugin:3.1.3:compile (scala-compile-first) @ test-dq-framework ---

[WARNING] Expected all dependencies to require Scala version: 2.11.12

[WARNING] com.twitter:chill_2.11:0.9.3 requires scala version: 2.11.12

[WARNING] org.apache.spark:spark-core_2.11:2.4.0 requires scala version: 2.11.12

[WARNING] org.json4s:json4s-jackson_2.11:3.5.3 requires scala version: 2.11.11


Error :

Caused by: java.lang.NoClassDefFoundError: scala/runtime/java8/JFunction1$mcZD$sp

    ... 13 more

Caused by: java.lang.ClassNotFoundException: scala.runtime.java8.JFunction1$mcZD$sp

    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

POM.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">



            <modelVersion>4.0.0</modelVersion>

            <artifactId>dq-test</artifactId>

            <groupId>com.package.name</groupId>

            <version>${revision}</version>



            <properties>

                            <revision>0.1</revision>

            </properties>



            <dependencies>

                            <dependency>

                                            <groupId>org.apache.spark</groupId>

                                            <artifactId>spark-core_2.11</artifactId>

                                            <version>2.4.0</version>

                                            <exclusions>

                                                            <exclusion>

                                                                            <groupId>com.fasterxml.jackson.core</groupId>

                                                                            <artifactId>*</artifactId>

                                                            </exclusion>

                                            </exclusions>

                            </dependency>



                            <dependency>

                                            <groupId>org.apache.spark</groupId>

                                            <artifactId>spark-sql_2.11</artifactId>

                                            <version>2.4.0</version>

                                            <exclusions>

                                                            <exclusion>

                                                                            <groupId>com.fasterxml.jackson.core</groupId>

                                                                            <artifactId>*</artifactId>

                                                            </exclusion>

                                            </exclusions>

                            </dependency>



                           

                            <dependency>

                                            <groupId>com.fasterxml.jackson.core</groupId>

                                            <artifactId>jackson-databind</artifactId>

                                            <version>2.11.0</version>

                            </dependency>



                            <dependency>

                                            <groupId>com.fasterxml.jackson.core</groupId>

                                            <artifactId>jackson-core</artifactId>

                                            <version>2.11.0</version>

                            </dependency>





                            <dependency>

                                            <groupId>com.amazon.deequ</groupId>

                                            <artifactId>deequ</artifactId>

                                            <version>1.1.0_spark-2.4-scala-2.11</version>

                                            <exclusions>

                                                            <exclusion>

                                                                            <groupId>com.fasterxml.jackson.core</groupId>

                                                                            <artifactId>*</artifactId>

                                                            </exclusion>

                                            </exclusions>

                            </dependency>





                            <dependency>

                                            <groupId>com.typesafe</groupId>

                                            <artifactId>config</artifactId>

                                            <version>1.2.1</version>

                            </dependency>



                           

                            <dependency>

                                            <groupId>com.sun.mail</groupId>

                                            <artifactId>javax.mail</artifactId>

                                            <version>1.6.2</version>

                            </dependency>



                            <dependency>

                                            <groupId>com.sun.activation</groupId>

                                            <artifactId>javax.activation</artifactId>

                                            <version>1.2.0</version>

                            </dependency>





            </dependencies>



            <build>

                            <plugins>



                                            <plugin>

                                                            <groupId>net.alchim31.maven</groupId>

                                                            <artifactId>scala-maven-plugin</artifactId>

                                                            <version>3.1.3</version>

                                                            <executions>

                                                                            <execution>

                                                                                            <id>scala-compile-first</id>

                                                                                            <phase>process-resources</phase>

                                                                                            <goals>

                                                                                                            <goal>compile</goal>

                                                                                            </goals>

                                                                            </execution>

                                                            </executions>

                                            </plugin>

                                            <plugin>

                                                            <artifactId>maven-compiler-plugin</artifactId>

                                                            <version>3.3</version>

                                                            <configuration>

                                                                            <skipMain>true</skipMain> <!-- skip compile -->

                                                                            <skip>true</skip> <!-- skip testCompile -->

                                                                            <source>1.8</source>

                                                                            <target>1.8</target>

                                                            </configuration>

                                            </plugin>

                                            <plugin>

                                                            <groupId>org.apache.maven.plugins</groupId>

                                                            <artifactId>maven-surefire-plugin</artifactId>

                                                            <version>2.7</version>

                                                            <configuration>

                                                                            <skipTests>true</skipTests>

                                                            </configuration>

                                            </plugin>



                                            <plugin>

                                                            <artifactId>maven-assembly-plugin</artifactId>

                                                            <configuration>

                                                                            <archive>

                                                                                            <manifest>

                                                                                                            <mainClass>className</mainClass>

                                                                                            </manifest>

                                                                            </archive>

                                                                            <descriptorRefs>

                                                                                            <descriptorRef>jar-with-dependencies</descriptorRef>

                                                                            </descriptorRefs>

                                                            </configuration>

                                                            <executions>

                                                                            <execution>

                                                                                            <id>make-assembly</id>

                                                                                            <phase>package</phase>

                                                                                            <goals>

                                                                                                            <goal>single</goal>

                                                                                            </goals>

                                                                            </execution>

                                                            </executions>

                                            </plugin>




       </plugins>
   </build>

anamikasingh-bigdata avatar Aug 24 '21 10:08 anamikasingh-bigdata

Hi. Can you please share the code that caused the error?

Also, you should use this release when using Spark 2.4: https://mvnrepository.com/artifact/com.amazon.deequ/deequ/1.2.2-spark-2.4

twollnik avatar Sep 07 '21 15:09 twollnik