Can't connect to Redshift (java.lang.NullPointerException) on 0.45.3.1

Hello! I have Redshift connection details that work fine on 0.46, but do not work on 0.45.3.1. I have to use 0.45.x because I use a Databricks SparkSQL plugin as well which only works on 0.45. Details and logs below. Any help would be greatly appreciated so that I can get these two databases hooked up.

Diagnostic info:

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.18+10",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.18",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.18+10",
    "os.name": "Linux",
    "os.version": "5.15.49-linuxkit",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  },
  "metabase-info": {
    "databases": [
      "sparksql-databricks"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "15.2 (Debian 15.2-1.pgdg110+1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.5.0"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2023-03-29",
      "tag": "v0.45.3.1",
      "branch": "release-x.45.x",
      "hash": "3b3097d"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Logs:

2023-04-14 12:09:52 2023-04-14 16:09:52,755 INFO driver.impl :: Initializing driver :redshift...
2023-04-14 12:09:52 2023-04-14 16:09:52,764 INFO plugins.classloader :: Added URL file:/app/plugins/redshift.metabase-driver.jar to classpath
2023-04-14 12:09:52 2023-04-14 16:09:52,765 DEBUG plugins.init-steps :: Loading plugin namespace metabase.driver.postgres...
2023-04-14 12:09:52 2023-04-14 16:09:52,766 DEBUG plugins.init-steps :: Loading plugin namespace metabase.driver.redshift...
2023-04-14 12:09:52 2023-04-14 16:09:52,834 INFO driver.impl :: Registered driver :redshift (parents: [:postgres :metabase.driver.sql-jdbc.execute.legacy-impl/use-legacy-classes-for-read-and-set]) 🚚
2023-04-14 12:09:52 2023-04-14 16:09:52,859 DEBUG plugins.jdbc-proxy :: Registering JDBC proxy driver for com.amazon.redshift.jdbc42.Driver...
2023-04-14 12:09:52 2023-04-14 16:09:52,860 INFO metabase.util :: Load lazy loading driver :redshift took 95.0 ms
2023-04-14 12:09:52 2023-04-14 16:09:52,863 ERROR api.database :: Cannot connect to Database
2023-04-14 12:09:52 java.lang.NullPointerException
2023-04-14 12:09:52     at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:97)
2023-04-14 12:09:52     at metabase.driver.connection$decorate_and_fix$fn__8441.invoke(connection.clj:40)
2023-04-14 12:09:52     at metabase.driver.connection.proxy$java.lang.Object$Connection$1d5212e.close(Unknown Source)
2023-04-14 12:09:52     at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1111)
2023-04-14 12:09:52     at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1093)
2023-04-14 12:09:52     at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1182)
2023-04-14 12:09:52     at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
2023-04-14 12:09:52     at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1160)
2023-04-14 12:09:52     at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$can_connect_with_spec_QMARK_.invokeStatic(connection.clj:297)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$can_connect_with_spec_QMARK_.invoke(connection.clj:294)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$can_connect_QMARK_$fn__36330.invoke(connection.clj:306)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection$fn__36312.invoke(connection.clj:282)
2023-04-14 12:09:52     at metabase.util.ssh$do_with_ssh_tunnel.invokeStatic(ssh.clj:139)
2023-04-14 12:09:52     at metabase.util.ssh$do_with_ssh_tunnel.invoke(ssh.clj:128)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invokeStatic(connection.clj:280)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invoke(connection.clj:276)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invokeStatic(connection.clj:305)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invoke(connection.clj:301)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc$fn__88593.invokeStatic(sql_jdbc.clj:38)
2023-04-14 12:09:52     at metabase.driver.sql_jdbc$fn__88593.invoke(sql_jdbc.clj:36)
2023-04-14 12:09:52     at clojure.lang.MultiFn.invoke(MultiFn.java:234)
2023-04-14 12:09:52     at metabase.driver.util$can_connect_with_details_QMARK_$fn__33794.invoke(util.clj:138)
2023-04-14 12:09:52     at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
2023-04-14 12:09:52     at clojure.lang.AFn.call(AFn.java:18)
2023-04-14 12:09:52     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2023-04-14 12:09:52     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2023-04-14 12:09:52     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2023-04-14 12:09:52     at java.base/java.lang.Thread.run(Thread.java:829)
2023-04-14 12:09:52 2023-04-14 16:09:52,874 DEBUG middleware.log :: POST /api/database 400 127.4 ms (1 DB calls) 
2023-04-14 12:09:52 {:message nil}

that's extremely weird as we have tons of customers running Metabase with Redshift, can you check if the databricks driver is colliding with Redshift? I'm guessing that's the cause. Please remove first the databricks driver, then connect Redshift and later on add the databricks drive

Ah, that is an interesting theory. I would have thought that plugins would be isolated, but I will try that. Thank you!

can you share the findings? got similar issue here -- but my case is failed to connect snowflake... found same error: java.lang.NullPointerException ; and {message:nil}

Upgrade to the latest version please

Hi Luiggi i have the same problem as well with Snowflake. I cant upgrade my current version of metabase and I need to use 0.45. As such, can I know what I can do?

I am running on docker so how can I remove the driver and readd it?

Also does this mean we have to do this everytime I have a new connection of snowflake?