Flink shaded table API

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Flink shaded table API

nragon
I'm getting the following error when using table API:

Caused by: java.lang.NoClassDefFoundError: org/apache/flink/shaded/calcite/com/fasterxml/jackson/databind/ObjectMapper
        at org.apache.flink.table.explain.PlanJsonParser.getSqlExecutionPlan(PlanJsonParser.java:32)
        ... 18 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.flink.shaded.calcite.com.fasterxml.jackson.databind.ObjectMapper
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 22 common frames omitted

Anyone?
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

Fabian Hueske-2
Can you post a small example to reproduce the issue?

Also, which version are you using?

Thanks,
Fabian

2017-07-25 12:44 GMT+02:00 nragon <[hidden email]>:
I'm getting the following error when using table API:

Caused by: java.lang.NoClassDefFoundError:
org/apache/flink/shaded/calcite/com/fasterxml/jackson/databind/ObjectMapper
        at
org.apache.flink.table.explain.PlanJsonParser.getSqlExecutionPlan(PlanJsonParser.java:32)
        ... 18 common frames omitted
Caused by: java.lang.ClassNotFoundException:
org.apache.flink.shaded.calcite.com.fasterxml.jackson.databind.ObjectMapper
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 22 common frames omitted

Anyone?
Thanks



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-shaded-table-API-tp14432.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

nragon
This post was updated on .
Let's see if I can sample this :P.

--------
First i'm reading from kafka.
--------
FlinkKafkaConsumer010<DataParameterMap> consumer = KafkaSource.consumer(this.zookeeper, this.sourceName, 5);
      consumer.assignTimestampsAndWatermarks(KafkaTimestampExtractor.extractor());

--------
Then, converting my object(DataParameterMap) into a Row
--------
return ViewMapFunction.map(env.addSource(consumer), this.entity, this.typeInfo);

--------
After that, I register the table
--------
tableEnv.registerTableSource("tableX", <previous object>)

--------
and execute sql ("SELECT APN, DATA_VOLUME_DOWN, DATA_VOLUME_UP, MSISDN FROM
PGW_VIEW_A";)
--------
tableEnv.sql(sql).printSchema();

The error happens here at this point.
I'm using version 1.3.1
Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

Chesnay Schepler
This sounds similar to https://issues.apache.org/jira/browse/FLINK-6173.

On 25.07.2017 13:07, nragon wrote:

> Let's see if I can sample this :P.
>
> --------
> First i'm reading from kafka.
> --------
> FlinkKafkaConsumer010<DataParameterMap> consumer =
> KafkaSource.consumer(this.zookeeper, this.sourceName, 5);
>      
> consumer.assignTimestampsAndWatermarks(KafkaTimestampExtractor.extractor());
>
> --------
> Then, converting my object(DataParameterMap) into a Row
> --------
> return ViewMapFunction.map(env.addSource(consumer), this.entity,
> this.typeInfo);
>
> --------
> After that, I register the table
> --------
> tableEnv.registerTableSource("tableX", <previous object>)
>
> --------
> and I execute an sql ("SELECT APN, DATA_VOLUME_DOWN, DATA_VOLUME_UP, MSISDN
> FROM
> PGW_VIEW_A";)
> --------
> tableEnv.sql(sql).printSchema();
>
> The error happens here at this point.
> I'm using version 1.3.1
>
>
>
>
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-shaded-table-API-tp14432p14435.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

nragon
Well, it might be scala conflits on my client side since no job is sent to stream environment.
When i remove print schema or explain the job in sent and executed properly on flink side.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

Fabian Hueske-2
Hi,

I tried to reproduce the problem, but did not get the exception you posted.
I implemented a job similar to yours and ran it both from the IDE and using the flink submission client using the 1.3.1 binaries.
In both cases, the schema was correctly printed.

Do you get the exception in the IDE or when submitting the program to an external cluster?
How do you include the flink-table.jar dependency? Do you built a fat jar or do you have it in the lib folder?

Best, Fabian

2017-07-25 13:31 GMT+02:00 nragon <[hidden email]>:
Well, it might be scala conflits on my client side since no job is sent to
stream environment.
When i remove print schema or explain the job in sent and executed properly
on flink side.

Thanks



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-shaded-table-API-tp14432p14437.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Flink shaded table API

nragon
Hi Fabian,

It's a dependency problem between our current libraries and flink's.

Thanks