-
Notifications
You must be signed in to change notification settings - Fork 117
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
use an existing database - connection error #13
Comments
I am able to connect the existing database using psql, but get the following error: The advised configuration: Raises: If I changed it to, it get the above-mentioned error |
It seems that jbdc driver is not installed the server |
Hi @JackN-code, can you provide the full command line and/or config file you're using to connect here? (Leave the passwords out, obviously) |
Hi meredydd, thanks so much for replying. Here is my config file: The url of database is copy exactly from the provider. I also tried: database: "jdbc:postgres://atheavhb:my_password@john.db.elephantsql.com:5432/atheavhb" all of them causes the error: |
I made a terrible mistake, it should be jdbc:postgresql instead of jdbc:postgres It works like a charm |
It seems that the real issue is here: |
Thank you @JackN-code and @toonsevrin, this helped me a lot. |
I got the following error when connecting the remote Postgres database
[ERROR anvil.app-server.run] #error {
:cause clojure.lang.PersistentArrayMap cannot be cast to java.lang.String
:via
[{:type java.lang.ClassCastException
:message clojure.lang.PersistentArrayMap cannot be cast to java.lang.String
:at [clojure.java.jdbc$get_connection invokeStatic jdbc.clj 381]}]
:trace
[[clojure.java.jdbc$get_connection invokeStatic jdbc.clj 381]
[clojure.java.jdbc$get_connection invoke jdbc.clj 274]
[clojure.java.jdbc$db_query_with_resultset_STAR_ invokeStatic jdbc.clj 1100]
[clojure.java.jdbc$db_query_with_resultset_STAR_ invoke jdbc.clj 1082]
[clojure.java.jdbc$query invokeStatic jdbc.clj 1171]
[clojure.java.jdbc$query invoke jdbc.clj 1133]
[clojure.java.jdbc$query invokeStatic jdbc.clj 1149]
[clojure.java.jdbc$query invoke jdbc.clj 1133]
[migrator.migrations$is_db_empty_QMARK_ invokeStatic migrations.clj 65]
[migrator.migrations$is_db_empty_QMARK_ invoke migrations.clj 63]
[migrator.core$migrate_BANG_$fn__862$fn__864 invoke core.clj 27]
[migrator.core$migrate_BANG_$fn__862 invoke core.clj 26]
[migrator.core$migrate_BANG_ invokeStatic core.clj 25]
[migrator.core$migrate_BANG_ invoke core.clj 20]
[anvil.app_server.run$_main$fn__1706 invoke run.clj 423]
[anvil.app_server.run$_main invokeStatic run.clj 422]
[anvil.app_server.run$_main doInvoke run.clj 224]
[clojure.lang.RestFn applyTo RestFn.java 137]
[anvil.app_server.run main nil -1]]}
The text was updated successfully, but these errors were encountered: