Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.InvalidClassException: org.apache.flink.streaming.api.operators.SimpleOperatorFactory; #78

Closed
jiamo opened this issue Dec 24, 2020 · 1 comment

Comments

@jiamo
Copy link

jiamo commented Dec 24, 2020

官方下载: flink-1.11.3-bin-scala_2.11.tgz

./bin/sql-client.sh embedded 

CREATE TABLE order_info(
    id BIGINT,
    user_id BIGINT,
    create_time TIMESTAMP(0),
    operate_time TIMESTAMP(0),
    province_id INT,
    order_status STRING,
    total_amount DECIMAL(10, 5)
) WITH (
    'connector' = 'mysql-cdc',
    'hostname' = 'localhost',
    'port' = '3306',
    'username' = 'root',
    'password' = '123456',
    'database-name' = 'test',
    'table-name' = 'order_info'
);

1.1.0 1.0.0 都试了。查询试依旧有

  [ERROR] Could not execute SQL statement. Reason:
  java.io.InvalidClassException: org.apache.flink.streaming.api.operators.SimpleOperatorFactory; local class incompatible: 
  stream classdesc serialVersionUID = 3847237780533203384, local class serialVersionUID = 1228256926922507147

不过尝试用 flink-connector-jdbc_2.11-1.12.0.jar 和 mysql-connector-java-8.0.16.jar 并使用

CREATE TABLE order_info(
    id BIGINT,
    user_id BIGINT,
    create_time TIMESTAMP(0),
    operate_time TIMESTAMP(0),
    province_id INT,
    order_status STRING,
    total_amount DECIMAL(10, 5)
) WITH (
    'connector' = 'jdbc',
    'url' = 'jdbc:mysql://localhost:3306/test',
    'username' = 'root',
    'password' = '123456',
    'table-name' = 'order_info'
);

也有

[ERROR] Could not execute SQL statement. Reason:
 org.apache.flink.util.SerializedThrowable: org.apache.flink.table.types.logical.RowType; local class incompatible: stream classdesc serialVersionUID = 2933845956639712598, local class serialVersionUID = -3216425311583408424

所以感觉并不是 cdc conector 的问题。更像是 flink 本身的问题。但是还是在这里提了。

@jiamo
Copy link
Author

jiamo commented Dec 25, 2020

发现之前起了一个 1.13 的集群。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant