Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to Athena gives a NullPointerException with a null message when not filling up the region section #42671

Open
paoliniluis opened this issue May 15, 2024 · 0 comments
Labels
Database/Athena .Frontend Priority:P2 Average run of the mill bug Type:Bug Product defects

Comments

@paoliniluis
Copy link
Contributor

Describe the bug

If you don't fill the region, it will throw an error immediately with a null pointer exception and a null value

To Reproduce

  1. set up an Athena and then try to connect Metabase to it (without filling up the region section)
  2. see the error

Expected behavior

It should show the error, and also we should respect the defaults

Logs

2024-05-15 01:20:47,085 ERROR driver.util :: Failed to connect to Database
java.lang.NullPointerException
	at clojure.string$starts_with_QMARK_.invokeStatic(string.clj:365)
	at clojure.string$starts_with_QMARK_.invoke(string.clj:361)
	at metabase.driver.athena$endpoint_for_region.invokeStatic(athena.clj:52)
	at metabase.driver.athena$endpoint_for_region.invoke(athena.clj:48)
	at metabase.driver.athena$fn__112981.invokeStatic(athena.clj:60)
	at metabase.driver.athena$fn__112981.invoke(athena.clj:55)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection$fn__51120.invoke(connection.clj:315)
	at metabase.util.ssh$do_with_ssh_tunnel.invokeStatic(ssh.clj:165)
	at metabase.util.ssh$do_with_ssh_tunnel.invoke(ssh.clj:154)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invokeStatic(connection.clj:314)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invoke(connection.clj:310)
	at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invokeStatic(connection.clj:339)
	at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invoke(connection.clj:335)
	at metabase.driver.sql_jdbc$fn__112862.invokeStatic(sql_jdbc.clj:49)
	at metabase.driver.sql_jdbc$fn__112862.invoke(sql_jdbc.clj:47)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.driver.util$can_connect_with_details_QMARK_$fn__60055.invoke(util.clj:148)
	at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
2024-05-15 01:20:47,088 ERROR api.database :: Cannot connect to Database
java.lang.NullPointerException
	at clojure.string$starts_with_QMARK_.invokeStatic(string.clj:365)
	at clojure.string$starts_with_QMARK_.invoke(string.clj:361)
	at metabase.driver.athena$endpoint_for_region.invokeStatic(athena.clj:52)
	at metabase.driver.athena$endpoint_for_region.invoke(athena.clj:48)
	at metabase.driver.athena$fn__112981.invokeStatic(athena.clj:60)
	at metabase.driver.athena$fn__112981.invoke(athena.clj:55)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection$fn__51120.invoke(connection.clj:315)
	at metabase.util.ssh$do_with_ssh_tunnel.invokeStatic(ssh.clj:165)
	at metabase.util.ssh$do_with_ssh_tunnel.invoke(ssh.clj:154)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invokeStatic(connection.clj:314)
	at metabase.driver.sql_jdbc.connection$do_with_connection_spec_for_testing_connection.invoke(connection.clj:310)
	at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invokeStatic(connection.clj:339)
	at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invoke(connection.clj:335)
	at metabase.driver.sql_jdbc$fn__112862.invokeStatic(sql_jdbc.clj:49)
	at metabase.driver.sql_jdbc$fn__112862.invoke(sql_jdbc.clj:47)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.driver.util$can_connect_with_details_QMARK_$fn__60055.invoke(util.clj:148)
	at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
2024-05-15 01:20:47,092 DEBUG middleware.log :: POST /api/database 400 8.4 ms (0 DB calls) 
{:message nil}

Information about your Metabase installation

v49.x

Severity

P2

Additional context

No response

@paoliniluis paoliniluis added Type:Bug Product defects Priority:P2 Average run of the mill bug .Frontend Database/Athena labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database/Athena .Frontend Priority:P2 Average run of the mill bug Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

1 participant