Running Console with a SQL database


I can’t connect the Console with a (local) SQL-backed database. The Console starts and shows the ‘hello’ database but after selecting it I’m getting a “Could not find hello//hello in catalog” exception in the Console log.

Any ideas on what should I be doing differently?

Thanks a lot!

To reproduce:

Install and start Postgres, create user and database:


Prepare the ‘sqldb’ database for Datomic:

CREATE TABLE datomic_kvs (id text NOT NULL, rev integer, map text, val bytea, CONSTRAINT pk_id PRIMARY KEY (id)) WITH (OIDS = FALSE);
ALTER TABLE datomic_kvs OWNER TO sqluser; GRANT ALL ON TABLE datomic_kvs TO sqluser; GRANT ALL ON TABLE datomic_kvs TO public;

Prepare the transactor configuration:


Start the transactor:

transactor -Xmx4g $(pwd)/

Create the ‘hello’ database using repl:

(require '[datomic.api :as d])
(def db-uri "datomic:sql://hello?jdbc:postgresql://localhost:5432/sqldb")
(d/create-database db-uri)

Start the console

console -p 8080 dev datomic:sql://hello?jdbc:postgresql://localhost:5432/sqldb?user=sqluser\&password=sqlpwd
    Console started on port: 8080
    dev = datomic:sql://hello?jdbc:postgresql://localhost:5432/sqldb
    Open http://localhost:8080/browse in your browser (Chrome recommended)

Select the ‘hello’ database in the browser:

java.lang.RuntimeException: Could not find hello//hello in catalog
    at datomic.peer$get_connection$fn__10699.invoke(peer.clj:681)
    at datomic.peer$get_connection.invokeStatic(peer.clj:669)
    at datomic.peer$get_connection.invoke(peer.clj:666)
    at datomic.peer$connect_uri.invokeStatic(peer.clj:751)
    at datomic.peer$connect_uri.invoke(peer.clj:743)
    at clojure.lang.Var.invoke(
    at datomic.Peer.connect(
    at datomic.api$connect.invokeStatic(api.clj:15)
    at datomic.api$connect.invoke(api.clj:13)
    at datomic.console$db.invokeStatic(console.clj:51)
    at datomic.console$db.invoke(console.clj:49)
    at datomic.console.BrowseUI$create_main_layout$db__1449.invoke(BrowseUI.clj:185)
    at datomic.console.BrowseUI$create_main_layout$fn__1509.invoke(BrowseUI.clj:337)
    at datomic.console.uihelp$add_vc$reify__587.valueChange(uihelp.clj:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.vaadin.event.ListenerMethod.receiveEvent(
    at com.vaadin.event.EventRouter.fireEvent(
    at com.vaadin.event.EventRouter.fireEvent(
    at com.vaadin.server.AbstractClientConnector.fireEvent(
    at com.vaadin.ui.AbstractField.fireValueChange(
    at com.vaadin.ui.AbstractField.setValue(
    at com.vaadin.ui.AbstractSelect.setValue(
    at com.vaadin.ui.ComboBox.changeVariables(
    at com.vaadin.server.communication.ServerRpcHandler.changeVariables(
    at com.vaadin.server.communication.ServerRpcHandler.handleBurst(
    at com.vaadin.server.communication.ServerRpcHandler.handleRpc(
    at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(
    at com.vaadin.server.SynchronizedRequestHandler.handleRequest(
    at com.vaadin.server.VaadinService.handleRequest(
    at com.vaadin.server.VaadinServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.eclipse.jetty.servlet.ServletHolder.handle(
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
    at org.eclipse.jetty.servlet.ServletHandler.doScope(
    at org.eclipse.jetty.server.session.SessionHandler.doScope(
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
    at org.eclipse.jetty.server.Server.handle(
    at org.eclipse.jetty.server.HttpChannel.handle(
    at org.eclipse.jetty.server.HttpConnection.onFillable(
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
    at org.eclipse.jetty.util.thread.QueuedThreadPool$


Hi @infinitary What version of Datomic Pro are you using here? After you create the DB at the REPL are you able to connect and transact using that URI?

(def conn (d/connect db-uri))

(def first-schema [{:db/ident :test/title
                           :db/valueType :db.type/string
                           :db/cardinality :db.cardinality/one
                           :db/doc "The title of a test"}])

@(d/transact conn first-schema)



Hi Jaret, thanks for the response. And fyi, I’m new to Datomic :slight_smile:

My version is datomic-pro-0.9.5786.

I can connect to the database and transact with the Java shell using the URI “datomic:sql://hello?jdbc:postgresql://localhost:5432/sqldb?user=sqluser&password=sqlpwd”.

Another issue seems to be that I fail to connect from repl (creating worked, see above), when opening the URI (with or without ?user…) I get: ArityException Wrong number of args (1) passed to: api/eval229/fn–230/G–216–237 clojure.lang.AFn.throwArity (

Still, the database is up and I can transact/query it from the Java shell and also from my own Java app with the peer library.


Console should be started with a storage URI, not a specific database URI:

(bin/console -p port alias transactor-uri-without-db [alias transactor-uri-without-db]+)

You are including your database name when you start console, thus the hello//hello



Thank you Marshall, sorry for not reading the doc properly.

However, starting the Console with

console -p 8080 sql datomic:sql://localhost:4334/

I get a “:db.error/invalid-sql-connection Must supply jdbc url in uri, or DataSource or Callable in protocolObject arg to Peer.connect trying to connect to datomic:sql://localhost:4334, make sure transactor is running” when trying to load the Console in the browser. The ‘sql’ word shows in Storage but the DB dropdown does not have any entries.


You still need to use a datomic URI, just leave off the db name.


Wow, cool, that could be one step closer…

console -p 8080 sql datomic:sql://jdbc:postgresql://localhost:5432/sqldb?user=sqluser\&password=sqlpwd

gives: “No suitable driver trying to connect to datomic:sql://jdbc:postgresql://localhost:5432/sqldb?user=sqluser&password=sqlpwd, make sure transactor is running”

PS: also happens if I manually add a postgres jar to the class path in the console launcher shell script
PPS: same for all working combinations of “datomic:sql://localhost:4334/jdbc:postgresql://localhost:5432/sqldb?user=sqluser&password=sqlpwd”


I believe you still need the ? in the URI (which separates db name from the storage address):



Thank you Marshall, indeed, that fixed it, Console runs against the local transactor that way :+1:

Just one more thing, to connect the Console with a foreign installation I’d still need to add the transactor location into the URI - testing on the same configuration, on the localhost, extending the above URI to:


the Console loads but selecting the ‘hello’ database gives a “Could not find transactor:4334/hello in catalog” exception in the Console log. I can get by with the above already, but if I could make this URI work as well, life would be perfect again :smile:


The database URI does not contain the transactor address. It is only the address to storage.
The peer discovers the address of the active transactor by reading it from storage (

The URI you use to launch console should just be the remote storage URI (without a db name), regardless of where your transactor is running.


Thank you soooo much, also for your patience :angel:

Replacing localhost with the remote database host makes the Console connect to the remote installation. However, I had to make my remote transactor hostname resolve on my local machine via /etc/hosts so that the local Console could also reach it (when selecting the actual database in the user interface), but then it worked fine!

Thanks again!