flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Bartnik <bart...@campus.tu-berlin.de>
Subject NoSuchMethodError when using the Flink Gelly library with Scala
Date Fri, 06 May 2016 12:47:43 GMT
Hi,

I am trying to run the code examples from the Gelly documentation, in 
particular this code:

import org.apache.flink.api.scala._
import org.apache.flink.graph.generator.GridGraph

object SampleObject {
   def main(args: Array[String]) {

     val env = ExecutionEnvironment.getExecutionEnvironment

     val graph = new GridGraph(env.getJavaEnv).addDimension(2, 
true).addDimension(4, true).generate()

    ...
   }
}

I created the project using the maven quickstart script, and compiling 
works fine,
but when I want to execute the jar on my local machine, the following 
error occurs:
java.lang.NoSuchMethodError: 
org.apache.flink.api.scala.ExecutionEnvironment.getJavaEnv()Lorg/apache/flink/api/java/ExecutionEnvironment;

My pom.xml looks like this:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <flink.version>1.1-SNAPSHOT</flink.version>
</properties>

<dependencies>
    <dependency>
       <groupId>org.apache.flink</groupId>
       <artifactId>flink-clients_2.11</artifactId>
       <version>${flink.version}</version>
    </dependency>
    <dependency>
       <groupId>org.apache.flink</groupId>
       <artifactId>flink-scala_2.11</artifactId>
       <version>${flink.version}</version>
    </dependency>
    <dependency>
       <groupId>org.apache.flink</groupId>
       <artifactId>flink-gelly-scala_2.11</artifactId>
       <version>${flink.version}</version>
    </dependency>
</dependencies>

Scala -version prints: Scala code runner version 2.11.6 -- Copyright 
2002-2013, LAMP/EPFL

Thanks,
Adrian

Mime
View raw message