Closed jayden526 closed 4 years ago
Hi @jayden526, Can you share your pom file that you use for building your app and running tests? Or if you uploaded your project somewhere, I could try to debug locally.
Thanks @mn-mikke, below is the pom file I used,
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<id>public</id>
<url></url>
</repository>
<repository>
<id>artima</id>
<name>Artima Maven Repository</name>
<url>http://repo.artima.com/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-native_${scala.sdk.version}</artifactId>
<version>3.6.7</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>com.intel.analytics.zoo</groupId>
<artifactId>analytics-zoo-bigdl_0.7.1-spark_2.2.0</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>ai.h2o</groupId>
<artifactId>sparkling-water-ml_2.11</artifactId>
<version>3.30.0.7-1-2.4</version>
</dependency>
<dependency>
<groupId>ai.h2o</groupId>
<artifactId>sparkling-water-examples_2.11</artifactId>
<version>3.30.0.7-1-2.4</version>
</dependency>
<dependency>
<groupId>ai.h2o</groupId>
<artifactId>sparkling-water-core_2.11</artifactId>
<version>3.30.0.7-1-2.4</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.11.7</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-repl_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_${scala.sdk.version}</artifactId>
<version>${spark.version}</version>
<scope>${spark.deps.scope}</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${google.guava.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>${typesafe.config.version}</version>
</dependency>
<dependency>
<groupId>org.scalactic</groupId>
<artifactId>scalactic_${scala.sdk.version}</artifactId>
<version>${scalactic.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.sdk.version}</artifactId>
<version>${scalatest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>net.vclk</groupId>
<artifactId>vclibjava</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.jpountz.lz4</groupId>
<artifactId>lz4</artifactId>
<version>${lz4.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.jdbc.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.binary.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.core.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.core.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.core.version}</version>
</dependency>
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-sparkml</artifactId>
<version>${jpmml-sparkml.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.13.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-scala</artifactId>
<version>11.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api-scala_${scala.sdk.version}</artifactId>
<version>11.0</version>
</dependency>
<dependency>
<groupId>com.softwaremill.sttp.client</groupId>
<artifactId>core_${scala.sdk.version}</artifactId>
<version>${sttp.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<configuration>
<args>
<arg>-language:implicitConversions</arg>
</args>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<forkMode>never</forkMode>
<parallel>false</parallel>
<threadCount>5</threadCount>
<skipTests>${scalaSkipTests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/metastore_db
</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${project.basedir}</directory>
<!--DO NOT UNCOMMENT BELOW INCLUDES WITHOUT UNCOMMENTING ABOVE LINE -->
<includes>
<include>**/*.tmp</include>
<include>**/*.log</include>
<include>**/*.log.*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</build>
Hi @mn-mikke , any idea of this? Thanks
Hi @jayden526,
provided
scope of Spark dependencies.@mn-mikke, Thanks a lot! Now I am adding the sparkling water jar when submit, and will see if it works.
@mn-mikke , it is able to run on cluster now! However it still fails in unit test by Maven (succeeds in Intellij unit test), an additional message is: [init] error: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/lib/rt.jar(java/lang/Object.class) Failed to initialize compiler: object scala in compiler mirror not found. Note that as of 2.8 scala does not assume use of the java classpath. For the old behavior pass -usejavacp to scala, or if using a Settings ** object programmatically, settings.usejavacp.value = true.
Looks like it can't find the right scala dependency, but I never had this issue in any other unit tests in this module, Do you think it is related to dependency of SW lib? Thank you!
Sparkling Water 3.30.0.7-1-2.4
was compiled with Scala 2.11.12
. Can you try to upgrade Scala version in your project to 2.11.12
?
Hi @jayden526, do you still have any problem or can I close this ticket?
@mn-mikke, sorry for the late reply, it didn't work for me last time and let me try it again to get an update.
Hi @mn-mikke , I tried scala 2.11.12 in maven, and now it gives a new error: Not a version: 9 java.lang.NumberFormatException: Not a version: 9 at scala.util.PropertiesTrait$class.parts$1(Properties.scala:184) at scala.util.PropertiesTrait$class.isJavaAtLeast(Properties.scala:187) at scala.util.Properties$.isJavaAtLeast(Properties.scala:17) at scala.tools.util.PathResolverBase$Calculated$.javaBootClasspath(PathResolver.scala:276) at scala.tools.util.PathResolverBase$Calculated$.basis(PathResolver.scala:283) at scala.tools.util.PathResolverBase$Calculated$.containers$lzycompute(PathResolver.scala:293) at scala.tools.util.PathResolverBase$Calculated$.containers(PathResolver.scala:293) at scala.tools.util.PathResolverBase.containers(PathResolver.scala:309) at scala.tools.util.PathResolver.computeResult(PathResolver.scala:341)
I checked online resources and looks like this issue was resolved after scala 2.11.11. Do you have any idea? Thanks a lot!
Hi @mn-mikke , as you said 'Sparkling Water 3.30.0.7-1-2.4 was compiled with Scala 2.11.12', while I don't have issues running with scala 2.11.7 on cluster (except unit test issue in maven), can I just go with 2.11.7? or any SW versions complied with 2.11.7? Thanks
I checked online resources and looks like this issue was resolved after scala 2.11.11. Do you have any idea? Thanks a lot!
I guess that one of your other project dependencies still reference an older version of scala. i would try to analyze via mvn dependency:tree
or other tool.
Any SW versions complied with 2.11.7?
Nope. All recent versions for spark 2.1 - 2.4 are compiled with Scala 2.11.12
Thanks @mn-mikke, this issue was finally resolved by setting 'spark.ext.h2o.repl.enabled=true' in spark config.
Sorry, should be 'spark.ext.h2o.repl.enabled, false' or H2OContext.setReplDisabled()
Could you please help with few issues, I tried to run a simple h2o GLM model in spark. I tried it in 3 environments:
Codes are:
The versions are: Scala -> 2.11.7 spark -> 2.4 hadoop -> 2.7 sparkling-water -> 3.30.0.7-1-2.4 sparkling water packages are imported in maven including: sparkling-water-ml_2.11, sparkling-water-core_2.11, sparkling-water-examples_2.11.
Code is able to run in IntelliJ scala unit test, while failed in maven unit test even with all same config, error in maven unit test is:
Code also failed when submitted to cluster, with error below:
Server error:
HTTP ERROR 405
Problem accessing /3/CloudLock. Reason:
Could you give me some insights into the two issues? Thanks a lot!