当前位置:   article > 正文

Could not find a suitable table factory for ‘org.apache.flink.table.factories.TableSourceFactory‘_exception in thread "main" org.apache.flink.table.

exception in thread "main" org.apache.flink.table.client.sqlclientexception:

启动FLINK SQL Client的时候

$FLINK_HOME/bin/sql-client.sh embedded -d $FLINK_HOME/conf/sql.my.yaml -l /home/appleyuchi/bigdata/flink-1.12/lib

出现下面的报错:

Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue.
    at org.apache.flink.table.client.SqlClient.main(SqlClient.java:213)
Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Could not create execution context.
    at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:818)
    at org.apache.flink.table.client.gateway.local.LocalExecutor.openSession(LocalExecutor.java:227)
    at org.apache.flink.table.client.SqlClient.start(SqlClient.java:108)
    at org.apache.flink.table.client.SqlClient.main(SqlClient.java:201)
Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException:

Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in
the classpath.

Reason: Required context properties mismatch.

The matching candidates:
org.apache.flink.table.sources.CsvAppendTableSourceFactory
Mismatched properties:
'connector.type' expects 'filesystem', but is 'kafka'
'format.type' expects 'csv', but is 'json'

 

最后两句啥意思:

报错信息sql.my.yaml中具体位置

'connector.type' expects 'filesystem', but is 'kafka'

'format.type' expects 'csv', but is 'json'

 

解决方案[1]:

$FLINK_HOME/conf/sql.my.yaml中的kafka版本修改为universal

Reference:

[1]Flink编程报错集锦


 

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号