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

Add logic to Derby.getDefaultDriver() to check for availability of different driver classes #2571

Merged
merged 2 commits into from
May 25, 2022

Conversation

AlexanderSashchenko
Copy link
Contributor

@AlexanderSashchenko AlexanderSashchenko commented Feb 23, 2022

Description

Newer versions of derby use a new driver name, and the old driver is no longer available.

Fix for Derby getDefaultDriver() method to load appropriate driver classes based on db version.

Fixes #1835

Copy link
Contributor

@nvoxland nvoxland left a comment

Choose a reason for hiding this comment

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

The change looks good. I did an auto-reformat and added in a comment that got lost.

@nvoxland
Copy link
Contributor

Code review and test results:

Things to be aware of

  • Behavior difference is derby 10.15 vs. earlier
  • Uses the same "look for the different possible classes in the classloader" trick that we do in MysqlDatabase for a similar problem
  • Only impacts derby

Things to worry about

  • Nothing

@nvoxland nvoxland changed the title Derby driver class name for 10.15.X.X issue #1835 Add logic to Derby.getDefaultDriver() to check for availability of different driver classes Feb 28, 2022
@XDelphiGrl XDelphiGrl self-assigned this Mar 10, 2022
@AlexanderSashchenko
Copy link
Contributor Author

Tested manually these changes against Apache Derby remote (server-based) database using 10.14 and 10.15 versions. Everything works fine.

@FBurguer
Copy link

FBurguer commented May 24, 2022

For this PR, i tested running liquibase with Derby 10.14 vs Derby 10.15 drivers, first in a "in memory" DB and after that with a Docker container. In both environments, liquibase has the same behavior with Derby 10.14 and Derby 10.15.
Test Environment:
Windows 10
Java 11
Docker image: az82/docker-derby

@kataggart kataggart added this to the NEXT milestone May 24, 2022
@nvoxland nvoxland merged commit 3a59bd8 into master May 25, 2022
@nvoxland nvoxland deleted the DAT-9452 branch May 25, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Derby driver class name for 10.15.X.X issue
6 participants