for-CONJ-742-and-CONJ-807, static loader for AuthenticationPlugin introduces Access Denied problem #159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For conj-742, Squirrel Client reports " Client does not support authentication protocol requested by server. plugin type was = 'xxx' "
This problem was fixed in commit 4e0705b.
But after this commit changed the loader into static, it reports Access denied problem (stack as at bottom). And this problem as been reported on conj-807.
I've tested that for conj-742, there is only need to specify the class loader Driver.class.getClassLoader() to solve the Squirrel Client problem. So I proposed this fix to solve both conj-742 and conj-807.
Thread 35 got Exception: java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=xx)(port=3306)(type=master) : Access denied for user 'xx'@'xx' (using password: YES)
java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=xx)(port=3306)(type=master) : Access denied for user 'xx'@'xx' (using password: YES)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:239)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1241)
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:610)
at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:142)
at org.mariadb.jdbc.Driver.connect(Driver.java:86)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
at TestCache.run(TestCache.java:100)
Caused by: java.sql.SQLException: Access denied for user 'xx'@'xx' (using password: YES)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:729)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:507)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1236)
... 6 more