You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by nragon <nu...@wedotechnologies.com> on 2017/07/25 10:44:59 UTC

Flink shaded table API

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.

Re: Flink shaded table API

Posted by nragon <nu...@wedotechnologies.com>.
Hi Fabian,

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

Thanks



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

Re: Flink shaded table API

Posted by Fabian Hueske <fh...@gmail.com>.
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 <nu...@wedotechnologies.com>:

> 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.
>

Re: Flink shaded table API

Posted by nragon <nu...@wedotechnologies.com>.
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.

Re: Flink shaded table API

Posted by Chesnay Schepler <ch...@apache.org>.
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.
>


Re: Flink shaded table API

Posted by nragon <nu...@wedotechnologies.com>.
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.

Re: Flink shaded table API

Posted by Fabian Hueske <fh...@gmail.com>.
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 <nu...@wedotechnologies.com>:

> 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.
>