Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-24450

Error: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 1.6.2, 2.2.0
    • Fix Version/s: None
    • Component/s: Spark Submit
    • Labels:

      Description

      Hello,

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

      pom.xml file:

      <?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>
      

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

      package com.test;
      
      import org.apache.curator.utils.PathUtils;
      
      public class Test {
       public static void main(String[] args) throws Exception {
       PathUtils.validatePath("/tmp");
       }
      }
      

       Result

      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)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              metron1122 Maxim Dahenko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: