[ 
https://issues.apache.org/jira/browse/FLINK-22907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17361376#comment-17361376
 ] 

Jark Wu commented on FLINK-22907:
---------------------------------

[~rdarling], please do not use {{--jar}} to load jars which are already in 
{{lib/}}. The {{--jar}} is only used for loading user jars which contains UDF, 
source, sinks. By default, Flink uses child-first classloader, so if you use 
{{--jar}} to load {{flink-table-blink_2.11-1.13.0.jar}}, then flink table 
classes (e.g. ICompilerFactory) maybe loaded by different classloaders, that's 
why it will throw above exception. 

> SQL Client queries fails on select statement
> --------------------------------------------
>
>                 Key: FLINK-22907
>                 URL: https://issues.apache.org/jira/browse/FLINK-22907
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.13.0
>         Environment: python 3.7.6
> JupyterLab
> apache-flink==1.13.0
>            Reporter: Ryan Darling
>            Priority: Major
>         Attachments: flink_sql_issue1.JPG
>
>
> I have configured a Jupyter notebook to test flink jobs with the sql client. 
> All of my source / sink table creation statements are successful but we are 
> unable to query the created tables
> In this scenario we are attempting to pull data from a kafka topic into a 
> source table and if successful insert into a sink table and on to another 
> kafka topic. 
> We start the sql_client.sh passing the needed jar file locations 
> (flink-sql-connector-kafka_2.11-1.13.0.jar, 
> flink-table-planner_2.12-1.13.0.jar, flink-table-common-1.13.0.jar, 
> flink-sql-avro-confluent-registry-1.13.0.jar, 
> flink-table-planner-blink_2.12-1.13.0.jar)
> Next we create the source table and point to a kafka topic that we know has 
> avro data in it and registered schemas in the schema registry. 
> CREATE TABLE avro_sources ( 
>  prop_id INT,
>  check_in_dt STRING,
>  check_out_dt STRING,
>  los INT,
>  guests INT,
>  rate_amt INT
>  ) WITH (
>  'connector' = 'kafka',
>  'topic' = 'avro_rate',
>  'properties.bootstrap.servers' = '<removed>',
>  'key.format' = 'avro-confluent',
>  'key.avro-confluent.schema-registry.url' = '<removed>',
>  'key.fields' = 'prop_id',
>  'value.format' = 'avro-confluent',
>  'value.avro-confluent.schema-registry.url' = '<removed>',
>  'value.fields-include' = 'ALL',
>  'key.avro-confluent.schema-registry.subject' = 'avro_rate',
>  'value.avro-confluent.schema-registry.subject' = 'avro_rate'
>  )
>  
> At this point I want to see the data that has been pulled into the source 
> table and I get the following error and are struggling to find a solution. I 
> feel this could be a bug 
> Flink SQL> select * from avro_sources;
> [ERROR] Could not execute SQL statement. Reason:
> java.lang.ClassCastException: org.codehaus.janino.CompilerFactory cannot be 
> cast to org.codehaus.commons.compiler.ICompilerFactory
>  
> Any guidance on how I can resolve the bug or the problem would be 
> appreciated. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to