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

fix: optimizing ClassNotFoundException error message for MYSQL #2246

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Z-HUANT
Copy link
Contributor

@Z-HUANT Z-HUANT commented Jul 15, 2023

Purpose of the PR

According to the documentation at https://hugegraph.apache.org/cn/docs/contribution-guidelines/hugegraph-server-idea-setup/, when setting up the development environment for the Server and using MySQL as the database, if the MySQL driver package is missing, the startup will fail. However, the error message displayed is not clear. This submission optimizes the error message.
image

Main Changes

Modified ClassNotFoundException exception error message.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:

First, modify the "hugegraph.properties" configuration file to use MySQL as the database. Start the program without importing the MySQL driver package and check the error message.
image

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Updated error message.

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@codecov
Copy link

codecov bot commented Jul 15, 2023

Codecov Report

Merging #2246 (7ec7306) into master (8ee3d32) will increase coverage by 3.55%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #2246      +/-   ##
============================================
+ Coverage     65.03%   68.59%   +3.55%     
+ Complexity      979      977       -2     
============================================
  Files           498      498              
  Lines         40682    40682              
  Branches       5681     5681              
============================================
+ Hits          26458    27904    +1446     
+ Misses        11596    10075    -1521     
- Partials       2628     2703      +75     
Impacted Files Coverage Δ
...n/java/org/apache/hugegraph/StandardHugeGraph.java 69.15% <0.00%> (+1.32%) ⬆️
...e/hugegraph/backend/store/mysql/MysqlSessions.java 69.49% <0.00%> (ø)

... and 67 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

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

lgtm

@imbajin imbajin changed the title fix:Optimizing Class.forName ClassNotFoundException error message fix: optimizing ClassNotFoundException error message for MYSQL Jul 17, 2023
@imbajin imbajin merged commit 23776a7 into apache:master Jul 17, 2023
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

Successfully merging this pull request may close these issues.

3 participants