Web Development with Clojure, Third Edition: "Internal Server Error" when trying to log in

Hi Dmitri Sotnikov @dmitri and Scot Brown @svmbrown,

I am trying to run some of the source code. Sometimes I’m able to log in fine (running guestbook-feeds-2 for example) and other times, I get “Internal Server Error” (for example, with guestbook-session). This happens with both “Log in” and “Register” where I get “Internal Server Error.” Is this something to do with Postgres? How do I debug this?

Thank you!

Just figured out what I was doing wrong. I couldn’t log in with any of the code before guestbook-profile, but at guestbook-profile it started working again.

My error: I was using the same database with everything. The database used in the last part of the book has JSONB added to it, and JSONB stuff in the code to deal with that. So when I ran code from the first part, the code didn’t have the JSONB stuff, but the database had it, so it wasn’t working.

Solution: If I add the json library to the project.clj file, and change db/core.clj according to the guestbook-profile instructions, and I also updated the queries to be safe, now I can log in fine.

Leaving my post up in case there are other newbies like me who are new to JSONB and how that affects the database and code.