© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
2 replies
SamikR

Hikari pool (Java) with Supabase throws SSL error: Received fatal alert: insufficient_security

I am trying to connect to my supabase db (free account) from Scala using Hikari pool. Here is the code snippet I am using for connecting:
private val config = new HikariConfig
config.setJdbcUrl(ConfigManager.get("db.url"))
config.setUsername(ConfigManager.get("db.user"))
config.setPassword(ConfigManager.get("db.password"))
config.setDriverClassName(ConfigManager.get("db.driver"))
config.setMaximumPoolSize(ConfigManager.get("db.maxPoolSize").toInt)
config.setIdleTimeout(ConfigManager.get("db.idleTimeout").toInt)
config.setConnectionTimeout(ConfigManager.get("db.connectionTimeout").toInt)
config.setAutoCommit(true)
config.addDataSourceProperty("sslMode", "DISABLED")
config.addDataSourceProperty("cachePrepStmts", "true")
config.addDataSourceProperty("prepStmtCacheSize", "250")
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048")
private val config = new HikariConfig
config.setJdbcUrl(ConfigManager.get("db.url"))
config.setUsername(ConfigManager.get("db.user"))
config.setPassword(ConfigManager.get("db.password"))
config.setDriverClassName(ConfigManager.get("db.driver"))
config.setMaximumPoolSize(ConfigManager.get("db.maxPoolSize").toInt)
config.setIdleTimeout(ConfigManager.get("db.idleTimeout").toInt)
config.setConnectionTimeout(ConfigManager.get("db.connectionTimeout").toInt)
config.setAutoCommit(true)
config.addDataSourceProperty("sslMode", "DISABLED")
config.addDataSourceProperty("cachePrepStmts", "true")
config.addDataSourceProperty("prepStmtCacheSize", "250")
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048")

When I run a SELECT query using JDBC, I get the following error:
java.lang.ExceptionInInitializerError
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: SSL error: Received fatal alert: insufficient_security
Caused by: org.postgresql.util.PSQLException: SSL error: Received fatal alert: insufficient_security
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: insufficient_security
java.lang.ExceptionInInitializerError
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: SSL error: Received fatal alert: insufficient_security
Caused by: org.postgresql.util.PSQLException: SSL error: Received fatal alert: insufficient_security
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: insufficient_security

I have tried searching for this error but have not made much progress. SSL is not being enforced.
Any pointers how I can get around this issue? Thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

SSL alert number 40
SupabaseSSupabase / help-and-questions
4y ago
supabase link command SSL connection error
SupabaseSSupabase / help-and-questions
6mo ago
SSL Error on supabase custom domain
SupabaseSSupabase / help-and-questions
3mo ago
Supabase security bypass
SupabaseSSupabase / help-and-questions
13mo ago