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

[Hotfix] The MySQL Connector/J is incompatible with the Apache 2.0 license. #3877

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

zhuangchong
Copy link
Contributor

@zhuangchong zhuangchong commented Jul 17, 2024

What changes were proposed in this pull request

The binary package lib directory contains mysql-connector-java-8.0.27.jar

Remove this jar because MySQL Connector/J is not compatible with Apache 2.0 licenses.

image

Brief change log

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): (yes / no)

@github-actions github-actions bot added the BUILD label Jul 17, 2024
@@ -240,6 +240,7 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<scope>test</scope>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this to the docs to tell users downloading mysql jar locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are instructions in the deployment document (https://streampark.apache.org/docs/platform/platform-build#introduce-mysql-dependency-package). At the same time, the instructions will be checked when starting the project (

case "mysql":
try {
Class.forName("com.mysql.cj.jdbc.Driver");
springConfig.put("spring.datasource.driver-class-name", "com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e) {
try {
Class.forName("com.mysql.jdbc.Driver");
springConfig.put("spring.datasource.driver-class-name", "com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e1) {
throw new ExceptionInInitializerError(
"datasource.dialect is mysql, \"com.mysql.cj.jdbc.Driver\" and \"com.mysql.jdbc.Driver\" classes not found, Please ensure that the MySQL Connector/J can be found under $streampark/lib,\n"
+ "Notice: The MySQL Connector/J is incompatible with the Apache 2.0 license, You need to download and put it into $streampark/lib");
}
}
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for clarification.

Copy link
Member

@wolfboys wolfboys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wolfboys wolfboys merged commit 7bdf54e into apache:dev Jul 17, 2024
40 of 41 checks passed
@zhuangchong zhuangchong deleted the remove-mysql-drive branch July 17, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants