Hi everyone! I’m trying to build a small REST API ...
# exposed
c
Hi everyone! I’m trying to build a small REST API and I’m trying to connect to a Google Cloud PostgreSQL using exposed. After more than 4 hours trying to make it work, I got nothing. This is the snippet of my connection snippet:
Copy code
Database.connect(
    url = "jdbc:postgresql://{ip}/{instance-name}",
    driver = "org.postgresql.Driver",
    user = "postgres",
    password = "{password}"
)
If tried to log in using gcloud and it works:
Copy code
gcloud sql connect {instance-name} --user=postgres
The error that I’m getting from Exposed when I run my server:
Copy code
Caused by:
java.lang.IllegalStateException: Can't load implementation for DatabaseConnectionAutoRegistration
	at org.jetbrains.exposed.sql.Database.<clinit>(Database.kt:64)
Any help would be super appreciated.