snowflake-jdbc icon indicating copy to clipboard operation
snowflake-jdbc copied to clipboard

Relocate Google Guava classes from com/google/common/util/concurrent/** in FIPS driver

Open SimbaGithub opened this issue 2 years ago • 1 comments

Overview

SNOW-XXXXX

The regular pom.xml was altered to include and relocate Google Guava classes from com/google/common/util/concurrent/** into the final assembly. However, this change was not made to the FIPS pom.xml equivalent, and thus some of the required classes to interact with GCP deployments (for file transfers in particular) are absent and fail to work.

Exception in thread "main" java.lang.NoClassDefFoundError: net/snowflake/client/jdbc/internal/google/common/util/concurrent/FutureCallback at net.snowflake.client.jdbc.internal.google.cloud.storage.StorageOptions.getUnauthenticatedInstance(StorageOptions.java:163) at net.snowflake.client.jdbc.cloud.storage.SnowflakeGCSClient.setupGCSClient(SnowflakeGCSClient.java:1083) at net.snowflake.client.jdbc.cloud.storage.SnowflakeGCSClient.createSnowflakeGCSClient(SnowflakeGCSClient.java:82) at net.snowflake.client.jdbc.cloud.storage.StorageClientFactory.createGCSClient(StorageClientFactory.java:221) at net.snowflake.client.jdbc.cloud.storage.StorageClientFactory.createClient(StorageClientFactory.java:78) at net.snowflake.client.jdbc.SnowflakeFileTransferAgent.(SnowflakeFileTransferAgent.java:729) at net.snowflake.client.core.SFStatement.executeFileTransfer(SFStatement.java:778) at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:129) at net.snowflake.client.core.SFStatement.execute(SFStatement.java:767) at net.snowflake.client.core.SFStatement.execute(SFStatement.java:677) at net.snowflake.client.jdbc.SnowflakeStatementV1.executeInternal(SnowflakeStatementV1.java:285) at net.snowflake.client.jdbc.SnowflakeStatementV1.execute(SnowflakeStatementV1.java:340) at SnowJDBCTest.main(SnowJDBCTest.java:23) Caused by: java.lang.ClassNotFoundException: net.snowflake.client.jdbc.internal.google.common.util.concurrent.FutureCallback at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

External contributors - please answer these questions before submitting a pull request. Thanks!

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR adressing? Make sure that there is an accompanying issue to your PR.

    Fixes #NNNN

  2. Fill out the following pre-review checklist:

    • [ ] I am adding a new automated test(s) to verify correctness of my new code
    • [ ] I am adding new logging messages
    • [ ] I am modyfying authorization mechanisms
    • [ ] I am adding new credentials
    • [ ] I am modyfying OCSP code
    • [ ] I am adding a new dependency
  3. Please describe how your code solves the related issue.

Include the same Google Common (Guava) classes as the regular JDBC driver includes.

Pre-review checklist

  • [ ] This change has passed precommit
  • [ ] I have reviewed code coverage report for my PR in (Sonarqube)

SimbaGithub avatar Aug 24 '22 18:08 SimbaGithub

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubemergegate[bot] avatar Aug 24 '22 23:08 sonarqubemergegate[bot]