flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Metzger <rmetz...@apache.org>
Subject Re: Could not load the task's invokable class.
Date Wed, 04 Nov 2015 14:18:55 GMT
It seems that Eclipse's export jar functionality is broken. But since maven
is working properly, I assume the issue is resolved.

For the other error, can you post the source code of the main() method
somewhere?
There are some hints how to resolve the issue in the exceptions (use of
.returns() annotation, missing type parameters). Maybe one of those hints
resolves the issues already.

On Tue, Nov 3, 2015 at 2:14 PM, Saleh <e106625@hotmail.com> wrote:

> Hi Stephan,
> Thanx for the response. Actually I am using Maven and below are all Flink
> dependencies I have in my pom.xml file.
>
>     /
>                 <dependency>
>                         <groupId>org.apache.flink</groupId>
>                         <artifactId>flink-core</artifactId>
>                         <version>0.9.1</version>
>                         <scope>provided</scope>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.flink</groupId>
>                         <artifactId>flink-streaming-core</artifactId>
>                         <version>0.9.1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.flink</groupId>
>                         <artifactId>flink-clients</artifactId>
>                         <version>0.9.1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.flink</groupId>
>                         <artifactId>flink-connector-kafka</artifactId>
>                         <version>0.9.1</version>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.apache.flink</groupId>
>                     <artifactId>flink-java8</artifactId>
>                     <version>0.9.1</version>
>     </dependency>/
>
> The problem is when I create a jar file using eclipse's *export*
> functionality, I get the previously mentioned *Could not load the task's
> invokable class* exception. And when I create the jar file with Maven's
> *mvn
> clean package* command, I get different exception shown below:
>
>     /org.apache.flink.api.common.functions.InvalidTypesException: The
> return
> type of function     'kafkaFlinkWordCount(FlinkWordCount.java:53)' could
> not
> be determined automatically, due to type erasure. You can give type
> information hints by using the returns(...) method on the result of the
> transformation call, or by letting your function implement the
> 'ResultTypeQueryable' interface.
>         at
>
> org.apache.flink.streaming.api.datastream.DataStream.getType(DataStream.java:207)
>         at
>
> org.apache.flink.streaming.api.datastream.DataStream.addSink(DataStream.java:1336)
>         at
>
> org.apache.flink.streaming.api.datastream.DataStream.print(DataStream.java:1029)/
>
> The error message continues and near to the end there is this kind of
> message:
>
>     /at org.apache.flink.client.CliFrontend.main(CliFrontend.java:920)
>     Caused by: org.apache.flink.api.common.functions.InvalidTypesException:
> The generic type parameters      of 'Tuple2' are missing.
>     It seems that your compiler has not stored them into the .class file.
>     Currently, only the Eclipse JDT compiler preserves the type information
> necessary to use the lambdas      feature type-safely.
>     See the documentation for more information about how to compile jobs
> containing lambda expressions./
>
> I tried to use *flink-0.10-SNAPSHORT* as you suggested, but it introduced a
> syntax error in my source code with this message:
>
>     */The method groupBy(0) os undefined for the type
> SingleOutputStreamOperation<Tuple2<String, Integer>, capture #1 of ?>/*
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Could-not-load-the-task-s-invokable-class-tp3336p3356.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>

Mime
View raw message