Skip to content

Commit

Permalink
Adjust mysql-connector-j native substitutions following dependency up…
Browse files Browse the repository at this point in the history
…grade
  • Loading branch information
yrodiere committed Nov 13, 2023
1 parent 42a028a commit 5a15d38
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@

import java.sql.SQLException;

import com.mysql.cj.exceptions.CJException;
import com.mysql.cj.exceptions.ExceptionFactory;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;

@TargetClass(className = "com.mysql.cj.protocol.a.authentication.AuthenticationOciClient")
final class AuthenticationOciClient {

@Substitute
private void loadOciConfig() {
throw ociNotSupported();
}

@Substitute
private void initializePrivateKey() {
throw ExceptionFactory
throw ociNotSupported();
}

private CJException ociNotSupported() {
return ExceptionFactory
.createException("OciClient authentication is not available in Quarkus when compiling to native-image:" +
" the MySQL JDBC driver team needs to cleanup the dependency requirements to make this possible." +
" If you need this resolved, please open a support request.");
Expand Down

0 comments on commit 5a15d38

Please sign in to comment.