[ 
https://issues.apache.org/jira/browse/SPARK-24450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Dahenko updated SPARK-24450:
----------------------------------
    Description: 
Hello,

artifact org.apache.curator, version 2.7.1 and higher doesn't work in a spark 
job.

pom.xml file:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd";>
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.test</groupId>
 <artifactId>test</artifactId>
 <version>0.0.1-SNAPSHOT</version>
 <packaging>jar</packaging>
 <name>"test"</name>
 <build>
 <plugins>
 <plugin>
 <artifactId>maven-assembly-plugin</artifactId>
 <executions>
 <execution>
 <id>test</id>
 </execution>
 </executions>
 </plugin>
 </plugins>
 </build>
<dependencies>
 <dependency>
 <groupId>org.apache.curator</groupId>
 <artifactId>curator-client</artifactId>
 <version>2.7.1</version>
 </dependency>
 </dependencies>
</project>
{code}
 Source code src/main/java/com/test/Test.java:
{code:java}
package com.test;

import org.apache.curator.utils.PathUtils;

public class Test {
 public static void main(String[] args) throws Exception {
 PathUtils.validatePath("/tmp");
 }
}
{code}
 Result
{code:java}
spark-submit --class com.test.Test --master local test-0.0.1-SNAPSHOT.jar
Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;
 at com.test.Test.main(Test.java:7)
 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.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
 at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
 at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
 at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
 at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
{code}

  was:
Hello,

artifact org.apache.curator, version 2.7.1 and higher doesn't work in a spark 
job.

pom.xml file:

{code}

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd";>
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.test</groupId>
 <artifactId>test</artifactId>
 <version>0.0.1-SNAPSHOT</version>
 <packaging>jar</packaging>
 <name>"test"</name>
 <build>
 <plugins>
 <plugin>
 <artifactId>maven-assembly-plugin</artifactId>
 <executions>
 <execution>
 <id>test</id>
 </execution>
 </executions>
 </plugin>
 </plugins>
 </build>

<dependencies>
 <dependency>
 <groupId>org.apache.curator</groupId>
 <artifactId>curator-client</artifactId>
 <version>2.7.1</version>
 </dependency>
 </dependencies>
</project>

{code}

 

Source code src/main/java/com/test/Test.java:

{code}

package com.test;

import org.apache.curator.utils.PathUtils;

public class Test {
 public static void main(String[] args) throws Exception {
 PathUtils.validatePath("/tmp");
 }
}

{code}

 

Result

{code}

spark-submit --class com.test.Test --master local test-0.0.1-SNAPSHOT.jar
Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;
 at com.test.Test.main(Test.java:7)
 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.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
 at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
 at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
 at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
 at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

{code}


> Error: Exception in thread "main" java.lang.NoSuchMethodError: 
> org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-24450
>                 URL: https://issues.apache.org/jira/browse/SPARK-24450
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Submit
>    Affects Versions: 1.6.2, 2.2.0
>            Reporter: Maxim Dahenko
>            Priority: Major
>
> Hello,
> artifact org.apache.curator, version 2.7.1 and higher doesn't work in a spark 
> job.
> pom.xml file:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <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/maven-v4_0_0.xsd";>
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.test</groupId>
>  <artifactId>test</artifactId>
>  <version>0.0.1-SNAPSHOT</version>
>  <packaging>jar</packaging>
>  <name>"test"</name>
>  <build>
>  <plugins>
>  <plugin>
>  <artifactId>maven-assembly-plugin</artifactId>
>  <executions>
>  <execution>
>  <id>test</id>
>  </execution>
>  </executions>
>  </plugin>
>  </plugins>
>  </build>
> <dependencies>
>  <dependency>
>  <groupId>org.apache.curator</groupId>
>  <artifactId>curator-client</artifactId>
>  <version>2.7.1</version>
>  </dependency>
>  </dependencies>
> </project>
> {code}
>  Source code src/main/java/com/test/Test.java:
> {code:java}
> package com.test;
> import org.apache.curator.utils.PathUtils;
> public class Test {
>  public static void main(String[] args) throws Exception {
>  PathUtils.validatePath("/tmp");
>  }
> }
> {code}
>  Result
> {code:java}
> spark-submit --class com.test.Test --master local test-0.0.1-SNAPSHOT.jar
> Exception in thread "main" java.lang.NoSuchMethodError: 
> org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;
>  at com.test.Test.main(Test.java:7)
>  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.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
>  at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
>  at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
>  at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
>  at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to