You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/07/07 10:38:16 UTC

[GitHub] [incubator-seatunnel] zhangyuge1 opened a new issue, #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

zhangyuge1 opened a new issue, #2149:
URL: https://github.com/apache/incubator-seatunnel/issues/2149

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   ![image](https://user-images.githubusercontent.com/49311144/177754124-f1eb4a1d-6550-44bf-a35c-f5e2fa2ca23d.png)
   ![image](https://user-images.githubusercontent.com/49311144/177754169-32233337-0667-4169-93e4-08cae7d30c6c.png)
   
   
   ### SeaTunnel Version
   
   2.1.2
   
   ### SeaTunnel Config
   
   ```conf
   env {
     # You can set flink configuration here
     execution.parallelism = 1
     #execution.checkpoint.interval = 10000
     #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
   }
   
   source {
     # This is a example source plugin **only for test and demonstrate the feature source plugin**
     #"name":"jack";"age":12
     #"name":"Mike";"age":14
       KafkaTableStream {
           consumer.bootstrap.servers = "127.0.0.1:9092"
           consumer.group.id = "seatunnel1"
           offset.reset = earliest
           topics = "source"
           result_table_name = "test"
           format.type = csv
           schema = "[{\"field\":\"name\",\"type\":\"string\"},{\"field\":\"age\",\"type\":\"int\"}]"
           format.field-delimiter = ","
       }
   
     # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
     # please go to https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Fake
   }
   
   transform {
       sql {
         sql = "select name,age from test"
       }
   
     # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
     # please go to https://seatunnel.apache.org/docs/flink/configuration/transform-plugins/Sql
   }
   
   sink {
       kafka {
         topics = "sink"
         producer.bootstrap.servers = "127.0.0.1:9092"
       }
     # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
     # please go to https://seatunnel.apache.org/docs/flink/configuration/sink-plugins/Console
   }
   ```
   
   
   ### Running Command
   
   ```shell
   TestContainer
   ```
   
   
   ### Error Exception
   
   ```log
   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.
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] adudu137 commented on issue #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

Posted by GitBox <gi...@apache.org>.
adudu137 commented on issue #2149:
URL: https://github.com/apache/incubator-seatunnel/issues/2149#issuecomment-1178703154

   What is your sample data?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] adudu137 commented on issue #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

Posted by GitBox <gi...@apache.org>.
adudu137 commented on issue #2149:
URL: https://github.com/apache/incubator-seatunnel/issues/2149#issuecomment-1178739219

   是不是缺少了org.apache.flink.table.factories.TableSourceFactory类,所以对应的应该是flink连接JDBC的包。去官网上下载你对应flink版本的连接JDBC的包


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X commented on issue #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on issue #2149:
URL: https://github.com/apache/incubator-seatunnel/issues/2149#issuecomment-1184163653

   Seem like this problem happened when spilt connector jar from core jar. Then flink can't find right kafka factory implement class when use SPI. We should checkout why flink can't find kafka source factory after connector jar splited. If you want use kafka you can use 2.1.1. Also can help us to fix it.😁


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] zhangyuge1 commented on issue #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

Posted by GitBox <gi...@apache.org>.
zhangyuge1 commented on issue #2149:
URL: https://github.com/apache/incubator-seatunnel/issues/2149#issuecomment-1178743430

   > 是不是缺少了org.apache.flink.table.factories.TableSourceFactory类,所以对应的应该是flink连接JDBC的包。去官网上下载你对应flink版本的连接JDBC的包
   
   我用的是Kakfa Connector,数据类型是csv


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [seatunnel] ZhouYuling commented on issue #2149: [Bug] [KafkaStreamTable] Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSourceFactory' in the classpath.

Posted by "ZhouYuling (via GitHub)" <gi...@apache.org>.
ZhouYuling commented on issue #2149:
URL: https://github.com/apache/seatunnel/issues/2149#issuecomment-1608805326

   解决思路如下:
   1.Could not find a suitable table factory,需要检查flink-1.xx.x/lib目录下是否存在jdbc相关包 
   2.No factory supports all properties,检查参数是否正确。以flink-1.16.2的jdbc连接mysql为例,我以为的代码:
   `CREATE TABLE products (
       id INT,
       name string,
       description string,
      PRIMARY KEY (id) NOT ENFORCED
     ) WITH (
   'connector.type'='jdbc',
   'connector.url'='jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=UTC',
   'connector.table'='products',
   'connector.driver'='com.mysql.cj.jdbc.Driver',
   'connector.port' = '3306',
   'connector.username'='root',
   'connector.password'='root'
   );`
   实际上的代码
   `CREATE TABLE products (
       id INT,
       name string,
       description string,
   	PRIMARY KEY (id) NOT ENFORCED
   ) WITH (
      'connector' = 'jdbc',
      'url' = 'jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=UTC',
      'table-name' = 'products',
      'username'='root',
      'password'='root'
   );`
   希望对你有帮助
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org