Web Development with Clojure, Third Edition - Chapter 1: (get-messages) not working

Title: Web Development with Clojure, Third Edition - (get-messages) not working (14)

I get the following error when running (get-messages). I’ve double checked that I’m following the previous steps. Is this an issue that just I am having?

guestbook.db.core=> (get-messages)
Execution error (JdbcSQLSyntaxErrorException) at org.h2.message.DbException/getJdbcSQLException (DbException.java:453).
Table "GUESTBOOK" not found; SQL statement:
SELECT * FROM guestbook [42102-200]
2 Likes

Hi there.

It looks like you haven’t run the migration to create the GUESTBOOK table.
This is covered on pages 9 and 10 (in “Refine your App > Managing Database Migrations”).
Try running (migrate) from the repl first, then retry (get-messages).

NOTE: migrate is in the user namespace, so you may have to do something like the following:

;; THIS WON'T WORK
guestbook.db.core=> (migrate)
;; ERROR!
;; Instead, do this first:
guestbook.db.core=>  (in-ns 'user)
user=> (migrate)
;; ... INFO migratus.core - Starting Migrations
;; ... <more logging about migrations...>
;; ... INFO migratus.core - Ending Migrations
3 Likes

Thanks so much! Solving that and being able to continue with the chapter really made my day.

4 Likes