(run-main-0) java.lang.NoSuchMethodError

前端 未结 9 1478
孤城傲影
孤城傲影 2020-12-15 05:11

I got a problem when I used sbt to run a spark job, I have finish compile, but when I run the command run, I got the problem below

 [er         


        
相关标签:
9条回答
  • 2020-12-15 05:31

    I used these versions and everything works now.

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.11.6</version>
        </dependency>
    
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-actor_2.11</artifactId>
            <version>2.3.11</version>
        </dependency>
    
    0 讨论(0)
  • 2020-12-15 05:32

    To me both scala versions 2.11 and 2.12 dint work , downgrading to 2.10.3 worked

    0 讨论(0)
  • 2020-12-15 05:35

    I met with the same error when I used scala-library-2.11 jar But when I replaced it with scala-library-2.10 jar . It runs fine

    0 讨论(0)
  • 2020-12-15 05:43

    Check whether the scala version you are using corresponds to the precompiled spark version.

    0 讨论(0)
  • 2020-12-15 05:44

    I've the exactly the same problem and got it fixed by downgrading scala 2.11.8 to 2.10.6.

    0 讨论(0)
  • 2020-12-15 05:51

    If you are getting the error and here because you cannot run Jupiter notebooks with Spark 2.1 and Scala 2.11 below is how I was able to make it work. Assumes you installed Jupiter and toree

    Pre-req - Make sure Docker is running else Make fails. Make sure gpg is installed else Make fails.

    Build steps -

    export SPARK_HOME=/Users/<path>/spark-2.1.0-hadoop2.7/ 
    git clone https://github.com/apache/incubator-toree.git 
    cd incubator-toree 
    make clean release APACHE_SPARK_VERSION=2.1.0 
    pip install --upgrade ./dist/toree-pip/toree-0.2.0.dev1.tar.gz 
    pip freeze |grep toree 
    jupyter toree install --spark_home=$SPARK_HOME
    

    ========================================================================

    To Start the notebook - SPARK_OPTS='--master=local[4]' jupyter notebook

    0 讨论(0)
提交回复
热议问题