You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by amir bahmanyari <am...@yahoo.com.INVALID> on 2017/04/14 17:03:36 UTC

Why do I need this dependency?

Hi colleagues,I build my app (fat jar) with no errors with these dependencies:        <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-connector-kafka-0.8_2.10</artifactId>   <version>1.2.0</version> </dependency>
 <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-java</artifactId>   <version>1.2.0</version> </dependency> <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-streaming-java_2.10</artifactId>   <version>1.2.0</version> </dependency> <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-clients_2.10</artifactId>   <version>1.2.0</version> </dependency>
When I deploy the fat jar built by above to Flink cluster, I get JM not accessible or similar errors and issues.When I add this dependency below in my app pom.xml on TOP OF EVERYTHING listed above, rebuild, then redeploy, everything works.
        <dependency>     <groupId>org.apache.flink</groupId>     <artifactId>flink-runtime_2.11</artifactId>     <version>1.2.0</version> </dependency>
Why do I need this dependency above? Why should it be ABOVE everything? And why doesnt it work when its located BELOW everything?Thanks and regards.

Re: Why do I need this dependency?

Posted by Chesnay Schepler <ch...@apache.org>.
Hello,

please make sure that you're formatting your mail properly, we can't 
help you if the dependencies are all mangled up.

So, these are the dependencies that you declared initially for which the 
job submission fails:

<dependency>
     <groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka-0.8_2.10</artifactId>
     <version>1.2.0</version>
  </dependency>

<dependency>
     <groupId>org.apache.flink</groupId>
     <artifactId>flink-java</artifactId>
     <version>1.2.0</version>
</dependency>

<dependency>
     <groupId>org.apache.flink</groupId>
     <artifactId>flink-streaming-java_2.10</artifactId>
     <version>1.2.0</version>
</dependency>

<dependency>
     <groupId>org.apache.flink</groupId>
     <artifactId>flink-clients_2.10</artifactId>
     <version>1.2.0</version>
</dependency>

This is the dependency that you're adding, with which everything works 
again:

<dependency>
     <groupId>org.apache.flink</groupId>
     <artifactId>flink-runtime_2.11</artifactId>
     <version>1.2.0</version>
</dependency>

The dependencies use different scala versions (2.10 vs 2.11).
Please find out with which scala version the cluster was started, adjust 
all dependencies accordingly,
and report back if the issue persists.

You can also take a look into the client/JobManager log files and see if 
any exception shows up.

Regards,
Chesnay

On 14.04.2017 19:03, amir bahmanyari wrote:
> Hi colleagues,I build my app (fat jar) with no errors with these dependencies:        <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-connector-kafka-0.8_2.10</artifactId>   <version>1.2.0</version> </dependency>
>   <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-java</artifactId>   <version>1.2.0</version> </dependency> <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-streaming-java_2.10</artifactId>   <version>1.2.0</version> </dependency> <dependency>   <groupId>org.apache.flink</groupId>   <artifactId>flink-clients_2.10</artifactId>   <version>1.2.0</version> </dependency>
> When I deploy the fat jar built by above to Flink cluster, I get JM not accessible or similar errors and issues.When I add this dependency below in my app pom.xml on TOP OF EVERYTHING listed above, rebuild, then redeploy, everything works.
>          <dependency>     <groupId>org.apache.flink</groupId>     <artifactId>flink-runtime_2.11</artifactId>     <version>1.2.0</version> </dependency>
> Why do I need this dependency above? Why should it be ABOVE everything? And why doesnt it work when its located BELOW everything?Thanks and regards.