bydloden
Cannot connect PostgreSQL to Java project (Ebean, JDBC)
Hello there, I'm trying to connect Railway PostgreSQL DB to my Java+Ebean project. I get this error:
io.ebean.datasource.DataSourceInitialiseException: Error initialising DataSource with user: postgres url:jdbc:postgresql://containers-us-west-79.railway.app:7512/railway error:No suitable driver found for jdbc:postgresql://containers-us-west-79.railway.app:7512/railway
I see that it needs a driver, but everything seems to be fine locally and I've added dependencies to Gradle build (implementation("org.postgresql:postgresql:42.6.0"
). I've created variable "URL to DB" like this: jdbc:postgresql://${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}
When I use same variables locally I can successfully connect to remote DB, but during deployment process previously mentioned error occurs.8 replies