Code Monkey home page Code Monkey logo

alloydb-java-connector's Introduction

AlloyDB Java Connector

CI Maven

The AlloyDB Java Connector is a Java library for connecting securely to your AlloyDB instances. Using a Connector provides the following benefits:

  • IAM Authorization: The Connector uses IAM to ensure only principals with valid permissions are allowed to connect.
  • Improved Security: The Connector uses TLS 1.3 encryption and identity verification between the client connector and the server-side proxy, independent of the database protocol.
  • Convenience: The Connector removes the requirement to use and distribute SSL certificates.

Usage

This library provides a socket factory for use with the JDBC Postgres Driver. At a high level, you will need to:

  1. Configure IAM permissions
  2. Add the Connector and Postgres driver as dependencies
  3. Configure a connection pool that configures the driver to use the Connector as a socket factory

For information on configuring a connection, see the documentation.

Configuring IAM permissions

The Java Connector uses Application Default Credentials (ADC). For information on how to configure Application Default Credentials, see the documentation.

In addition, the associated IAM principal must have the IAM role "Cloud AlloyDB Client" (i.e., roles/alloydb.client). See the docs on AlloyDB IAM permissions for more information.

Debug Logging

The Java Connector supports optional debug logging to help diagnose problems with the background certificate refresh. To enable it, add the following to the file /src/main/resources/application.yml:

logging.level.root=DEBUG

Support policy

Major version lifecycle

This project uses semantic versioning, and uses the following lifecycle regarding support for a major version:

Active - Active versions get all new features and security fixes (that would not otherwise introduce a breaking change). New major versions are guaranteed to be "active" for a minimum of 1 year.

Deprecated - Deprecated versions continue to receive security and critical bug fixes, but do not receive new features. Deprecated versions will be supported for 1 year.

Unsupported - Any major version that has been deprecated for >=1 year is considered unsupported.

Supported JDK versions

We test and support at minimum, any publicly supported LTS JDK version. Changes in supported versions will be considered a minor change, and will be listed in the release notes.

Release cadence

This project aims for a minimum monthly release cadence. If no new features or fixes have been added, a new PATCH version with the latest dependencies is released.

Versioning

This library follows Semantic Versioning.

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information how to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Code of Conduct for more information.

License

Apache 2.0 - See LICENSE for more information.

Notice

Java is a registered trademark of Oracle and/or its affiliates.

alloydb-java-connector's People

Contributors

andrewzurn avatar dependabot[bot] avatar enocom avatar hessjcg avatar jackwotherspoon avatar nancynh avatar release-please[bot] avatar renovate-bot avatar totoro642 avatar ttosta-google avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alloydb-java-connector's Issues

Group dependencies in Renovate

Group the following packages in Renovate to reduce the number of updates:

com.google.api:gax
com.google.api.grpc:proto-google-cloud-alloydb-v1beta
com.google.cloud:google-cloud-alloydb

alloydb.ITDefaultConnectionInfoRepositoryTest: testGetConnectionInfo failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITDefaultConnectionInfoRepositoryTest.tearDown(ITDefaultConnectionInfoRepositoryTest.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Update dependency and renovate config

Perform the following changes to improve the dependency updates:

  1. Update pom.xml:
    1.1. Remove the version for gax and guava dependencies
    1.2. Add google-cloud-shared-dependencies
  2. Update renovate.json to match the changes below

alloydb.ITConnectorTest: testConnect_whenTlsHandshakeFails failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITConnectorTest.tearDown(ITConnectorTest.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Stub Google Auth Credentials for unit tests

Currently the units and windows CI builds require valid Google auth credentials as a dependency for tests to succeed. We should stub the credentials so that the unit tests can pass in any environment and not depend on valid creds.

Part of this PR should be to disable auth setup in units and windows builds for pull requests, allowing for faster builds.

- name: Authenticate to Google Cloud
    # only needed for Flakybot on periodic (schedule) and continuous (push) events
    if: ${{ github.event_name == 'schedule' || github.event_name == 'push' }}
    uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033 # v1.1.1

alloydb.ConnectionInfoCacheTest: testForceRefresh_schedulesNextRefreshImmediately failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 752fe7d
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/6226249212
status: failed

Test output
expected: 1
but was : 2
	at com.google.cloud.alloydb.ConnectionInfoCacheTest.testForceRefresh_schedulesNextRefreshImmediately(ConnectionInfoCacheTest.java:335)

Send public key instead of CSR in the generateClientCertificate API call

Update DefaultConnectionInfoRepository.java to send public key instead of CSR.

I tried it today (e.g. using setPublicKey(keyPair.getPublic().toString())) and I got the error:

java.util.concurrent.ExecutionException: com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: 
The CreateCertificateRequest proto is invalid:\n * certificate.config.public_key: Field `key` must be explicitly specified.

We should wait until GenerateClientCertificateRequest is fixed.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • chore(deps): Update dependencies for github (github/codeql-action, google-github-actions/auth, graalvm/setup-graalvm)
  • deps: Update Non-major dependencies (com.google.api.grpc:proto-google-common-protos, com.google.api:gax-grpc, com.google.cloud:google-cloud-alloydb-connectors-bom, com.google.cloud:google-cloud-alloydb-bom, com.google.cloud:google-cloud-shared-dependencies, org.postgresql:postgresql, org.apache.maven.plugins:maven-deploy-plugin, com.google.cloud:google-cloud-shared-config)

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • google-github-actions/auth v2.1.4@f112390a2df9932162083945e46d439060d66ec2
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • google-github-actions/auth v2.1.4@f112390a2df9932162083945e46d439060d66ec2
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • s4u/setup-maven-action 8a09fe4cf25ea749342c76674967fd0f23371cc7
  • graalvm/setup-graalvm v1.2.2@2911b2304bee2c2f59b9a67bf45f025a6b6de4b1
  • google-github-actions/auth v2.1.4@f112390a2df9932162083945e46d439060d66ec2
  • google-github-actions/get-secretmanager-secrets v2.1.4@95a0b09b8348ef3d02c68c6ba5662a037e78d713
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4.2.2@6a0805fcefea3d4657a47ac4c165951e33482018
  • s4u/setup-maven-action 8a09fe4cf25ea749342c76674967fd0f23371cc7
  • google-github-actions/auth v2.1.4@f112390a2df9932162083945e46d439060d66ec2
  • google-github-actions/get-secretmanager-secrets v2.1.4@95a0b09b8348ef3d02c68c6ba5662a037e78d713
.github/workflows/codeql.yml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • github/codeql-action v3.26.2@429e1977040da7a23b6822b13c129cd1ba93dbb2
  • github/codeql-action v3.26.2@429e1977040da7a23b6822b13c129cd1ba93dbb2
  • github/codeql-action v3.26.2@429e1977040da7a23b6822b13c129cd1ba93dbb2
.github/workflows/scorecard.yml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • ossf/scorecard-action v2.4.0@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
  • actions/upload-artifact v4.3.6@834a144ee995460fba8ed112a2fc961b36a5ec5a
  • github/codeql-action v3.26.2@429e1977040da7a23b6822b13c129cd1ba93dbb2
maven
alloydb-jdbc-connector/pom.xml
  • com.google.cloud:alloydb-connector-parent 1.1.6-SNAPSHOT
  • org.postgresql:postgresql 42.7.3
  • org.postgresql:postgresql 42.7.3
pom.xml
  • com.google.cloud:google-cloud-shared-config 1.10.0
  • com.google.cloud:google-cloud-shared-dependencies 3.33.0
  • com.google.cloud:google-cloud-alloydb-bom 0.36.0
  • com.google.cloud:google-cloud-alloydb-connectors-bom 0.25.0
  • io.grpc:grpc-bom 1.66.0
  • com.google.errorprone:error_prone_annotations 2.30.0
  • org.slf4j:slf4j-api 2.0.16
  • junit:junit 4.13.2
  • com.google.truth:truth 1.4.4
  • org.jmock:jmock 2.13.1
  • com.zaxxer:HikariCP 4.0.3
  • org.bouncycastle:bcprov-jdk18on 1.78.1
  • org.bouncycastle:bcpkix-jdk18on 1.78.1
  • com.google.api:gax-grpc 2.51.0
  • com.google.api.grpc:proto-google-common-protos 2.42.0
  • com.google.guava:failureaccess 1.0.2
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • com.google.errorprone:error_prone_core 2.30.0
  • org.jacoco:jacoco-maven-plugin 0.8.12
  • org.junit.platform:junit-platform-engine 1.11.0
  • org.junit.platform:junit-platform-commons 1.11.0
  • org.junit.vintage:junit-vintage-engine 5.11.0
samples/install-without-bom/pom.xml
  • com.google.cloud.samples:shared-configuration 1.2.0
  • com.google.cloud:alloydb-jdbc-connector 1.1.6-SNAPSHOT
  • junit:junit 4.13.2
  • com.google.truth:truth 1.4.4
  • org.codehaus.mojo:build-helper-maven-plugin 3.6.0
samples/pom.xml
  • com.google.cloud.samples:shared-configuration 1.2.0
  • org.apache.maven.plugins:maven-deploy-plugin 3.1.2
  • org.sonatype.plugins:nexus-staging-maven-plugin 1.7.0
samples/snapshot/pom.xml
  • com.google.cloud.samples:shared-configuration 1.2.0
  • com.google.cloud:alloydb-jdbc-connector 1.1.6-SNAPSHOT
  • junit:junit 4.13.2
  • com.google.truth:truth 1.4.4
  • org.codehaus.mojo:build-helper-maven-plugin 3.6.0
samples/snippets/pom.xml
  • com.google.cloud.samples:shared-configuration 1.2.0
  • com.google.cloud:alloydb-jdbc-connector 1.1.6-SNAPSHOT
  • junit:junit 4.13.2
  • com.google.truth:truth 1.4.4

  • Check this box to trigger a request for Renovate to run again on this repository

Release to Maven Central

Feature Description

This library needs to be release to Maven Central.

Sample code

No response

Alternatives Considered

No response

Additional Details

No response

Allow callers to configure multiple "connectors" per socket factory

Feature Description

This is a feature request to add support for a "Connector" type that can be registered with the SocketFactory.

In real usage, an application would first call ConnectorRegistry.register() to register the configuration for a named connection.

ConnectorConfig config =  new ConnectorConfig.Builder()
            .withTargetPrincipal("[email protected]")
            .withDelegates(Arrays.asList("[email protected]"))
            .build();
ConnectorRegistry.register("my-connector", config);

Then the application would use the connector by adding the alloydbNamedConnector property:

HikariConfig config = new HikariConfig();

config.setJdbcUrl("jdbc:postgresql:///postgres");
config.setUsername(System.getenv("ALLOYDB_USER"));
config.setPassword(System.getenv("ALLOYDB_PASS"));

config.addDataSourceProperty("socketFactory", "com.google.cloud.alloydb.SocketFactory");
config.addDataSourceProperty("alloydbInstanceName", System.getenv("ALLOYDB_INSTANCE_NAME"));
config.addDataSourceProperty("alloydbNamedConnector", "my-connector");

HikariDataSource dataSource = new HikariDataSource(config);

The application can stop individual named connectors, or all connectors:

ConnectorRegistry.close("my-connector");

The application can shutdown the connector, preventing any new connections and stoping all connector threads.

ConnectorRegistry.shutdown();

This is porting GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1226 to alloydb-java-connector.

Add google credentials to connector config

Feature Description

Provides new configuration fields ConnectorConfig that allow the user to connectors use a specific GoogleCredential. users may set one of these three fields:

  • Supplier<GoogleCredentials> googleCredentialsSupplier - a supplier to provide GoogleCredentials instances to the connector.
  • GoogleCredentials googleCredentials - an instance of GoogleCredentials to use for all requests.
  • String googleCredentialsPath - path to file containing GoogleCredentials json.

Adds a JDBC Connection Property alloydbGoogleCredentialsPath to set the googleCredentialsPath field.

This is porting GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1675 to alloydb-java-connector.

alloydb.ITConnectorTest: testHashCode failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITConnectorTest.tearDown(ITConnectorTest.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Add reset to the ConnectorRegistry

Feature Description

An application should use the public Java API to reset the connector registry.

  • ConnectorRegistry.reset() - Stops all threads, clears all config, future attempts to connect will start a new Connector.

An application would use reset() when it needs to reload its configuration. This would gracefully close all Connector instances, causing them to reload on the next connection attempt.

This is porting GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1688 to alloydb-java-connector.

Support configuring connection pools with different configs

Feature Request

Currently if a client configures multiple connection pools with different configs (e.g. connection pool A with SA impersonation and connection pool B without SA impersonation), the connector will be wired up for connection pool A.

We should support configuring connection pools with different configs.

Add shutdown to the ConnectorRegistry

Feature Description

An application should use the public Java API to either shut down the connector registry.

  • ConnectorRegistry.shutdown() - Stops all threads, clears all config, and causes future attempts to connect will fail.

An application would use shutdown() when it receives a callback to gracefully stop itself. The application would then have gracefully stop all its background processes. The application calls shutdown() so that if some all other background threads cannot start a database connection after ConnectorRegistry.shutdown() is called.

This is porting GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1688 to alloydb-java-connector.

Add support for GraalVM builds in CI

Feature Description

Previous builds passed with GraalVM, but a recent CI-related change has broken them. This is the issue for restoring CI builds against GraalVM.

Sample code

No response

Alternatives Considered

No response

Additional Details

No response

alloydb.ITConnectorTest: testConnect_createsSocketConnection failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITConnectorTest.tearDown(ITConnectorTest.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

alloydb.ITDirectPathTest: testConnect failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: d247d38
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/6659124144
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.AlloyDBDirectPathDataSource.getPassword(AlloyDBDirectPathDataSource.java:44)
	at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:319)
	at com.zaxxer.hikari.pool.PoolBase.(PoolBase.java:114)
	at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:108)
	at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)
	at com.google.cloud.alloydb.AlloyDBDirectPathDataSource.(AlloyDBDirectPathDataSource.java:36)
	at com.google.cloud.alloydb.AlloyDbJdbcDirectPathDataSourceFactory.createDataSource(AlloyDbJdbcDirectPathDataSourceFactory.java:35)
	at com.google.cloud.alloydb.ITDirectPathTest.setUp(ITDirectPathTest.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Add test demonstrating Auto IAM AuthN on direct path

Feature Description

Include a test showing how to configure HikariCP to generate an OAuth2 token on every connection creation. This enabled Auto IAM AuthN without the Java Connector.

Sample code

No response

Alternatives Considered

No response

Additional Details

No response

alloydb.ITDefaultConnectionInfoRepositoryTest: testGentConnectionInfo_throwsException_forInvalidInstanceName failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITDefaultConnectionInfoRepositoryTest.tearDown(ITDefaultConnectionInfoRepositoryTest.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

alloydb.ITConnectorTest: testEquals failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
java.lang.NullPointerException
	at com.google.cloud.alloydb.ITConnectorTest.tearDown(ITConnectorTest.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

alloydb.ITSocketFactoryTest: testConnect failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5c461b9
buildURL: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/5602303598
status: failed

Test output
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The SocketFactory class provided com.google.cloud.alloydb.SocketFactory could not be instantiated.
	at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582)
	at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
	at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)
	at com.google.cloud.alloydb.ITSocketFactoryTest.setUp(ITSocketFactoryTest.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
Caused by: org.postgresql.util.PSQLException: The SocketFactory class provided com.google.cloud.alloydb.SocketFactory could not be instantiated.
	at org.postgresql.core.SocketFactoryFactory.getSocketFactory(SocketFactoryFactory.java:43)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:227)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)
	at org.postgresql.jdbc.PgConnection.(PgConnection.java:263)
	at org.postgresql.Driver.makeConnection(Driver.java:443)
	at org.postgresql.Driver.connect(Driver.java:297)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
	... 44 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.postgresql.util.ObjectFactory.instantiate(ObjectFactory.java:66)
	at org.postgresql.core.SocketFactoryFactory.getSocketFactory(SocketFactoryFactory.java:39)
	... 54 more
Caused by: java.lang.NoSuchMethodError: com.google.api.gax.rpc.RequestUrlParamsEncoder.(Lcom/google/api/gax/rpc/RequestParamsExtractor;)V
	at com.google.api.gax.grpc.GrpcUnaryRequestParamCallable.(GrpcUnaryRequestParamCallable.java:54)
	at com.google.api.gax.grpc.GrpcRawCallableFactory.createUnaryCallable(GrpcRawCallableFactory.java:59)
	at com.google.api.gax.grpc.GrpcCallableFactory.createBaseUnaryCallable(GrpcCallableFactory.java:85)
	at com.google.api.gax.grpc.GrpcCallableFactory.createUnaryCallable(GrpcCallableFactory.java:103)
	at com.google.cloud.alloydb.v1beta.stub.GrpcAlloyDBAdminCallableFactory.createUnaryCallable(GrpcAlloyDBAdminCallableFactory.java:54)
	at com.google.longrunning.stub.GrpcOperationsStub.(GrpcOperationsStub.java:226)
	at com.google.longrunning.stub.GrpcOperationsStub.create(GrpcOperationsStub.java:133)
	at com.google.cloud.alloydb.v1beta.stub.GrpcAlloyDBAdminStub.(GrpcAlloyDBAdminStub.java:477)
	at com.google.cloud.alloydb.v1beta.stub.GrpcAlloyDBAdminStub.(GrpcAlloyDBAdminStub.java:463)
	at com.google.cloud.alloydb.v1beta.stub.GrpcAlloyDBAdminStub.create(GrpcAlloyDBAdminStub.java:443)
	at com.google.cloud.alloydb.v1beta.stub.AlloyDBAdminStubSettings.createStub(AlloyDBAdminStubSettings.java:764)
	at com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.(AlloyDBAdminClient.java:170)
	at com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.create(AlloyDBAdminClient.java:152)
	at com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.create(AlloyDBAdminClient.java:144)
	at com.google.cloud.alloydb.ConnectorRegistry.(ConnectorRegistry.java:40)
	at com.google.cloud.alloydb.ConnectorRegistry.(ConnectorRegistry.java:31)
	at com.google.cloud.alloydb.SocketFactory.(SocketFactory.java:34)
	... 60 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.