Yes, I was having problems with the emacs repl http://stackoverflow.com/questions/20828985/compilerexception-java-lang-runtimeexception-unable-to-resolve-symbol-cloju after I created the tables I did not get the error.
On Sunday, December 29, 2013 6:43:59 PM UTC-4, Sean Corfield wrote: > > Reading that tutorial, it looks like it expects you to call > (create-tables) manually via the REPL. > > On Sun, Dec 29, 2013 at 3:47 AM, Zeynel <azey...@gmail.com <javascript:>> > wrote: > > The first lines of the trace says: > > > > Failure to execute query with SQL: > > > > SELECT "GUESTBOOK" .* FROM "GUESTBOOK" :: [] > > JdbcSQLException: > > Message: Table "GUESTBOOK" not found; SQL statement > > > > SELECT "GUESTBOOK".* FROM "GUESTBOOK" ... > > > > I see that there is a "create-guestbook-table" in schema.clj > > > > (defn create-guestbook-table [] > > (sql/with-connection > > db-spec > > (sql/create-table > > :guestbook > > [:id "INTEGER PRIMARY KEY AUTO_INCREMENT"] > > [:timestamp :timestamp] > > [:name "varchar(30)"] > > [:message "varchar(200)"]) > > (sql/do-commands > > "CREATE INDEX timestamp_index ON guestbook (timestamp)"))) > > > > which is called by create-tables function underneath it > > > > (defn create-tables > > "creates the database tables used by the application" > > [] > > (create-guestbook-table)) > > > > How can I find out why this table is not created? > > > > I copied the code from this tutorial > > http://www.luminusweb.net/docs/guestbook.md > > > > I am looking for help about how to read these traces and good practice > to > > debug. This is just my first clojure project. > > > > And these are the references and line numbers to .clj files in the trace > > that I could find: > > > > db.clj line #21 > > > > 20 (defn get-messages [] > > 21 (select guestbook)) > > > > home.clj line #34 > > > > 33 (defn about-page [] > > 34 (GET "/" [] (home-page)) > > > > The entirety of the trace is copied below: > > > > Failure to execute query with SQL: > > SELECT "GUESTBOOK".* FROM "GUESTBOOK" :: [] > > JdbcSQLException: > > Message: Table "GUESTBOOK" not found; SQL statement: > > SELECT "GUESTBOOK".* FROM "GUESTBOOK" [42102-174] > > SQLState: 42S02 > > Error Code: 42102 > > org.h2.jdbc.JdbcSQLException: Table "GUESTBOOK" not found; SQL > statement: > > SELECT "GUESTBOOK".* FROM "GUESTBOOK" [42102-174] > > DbException.java:332 > > org.h2.message.DbException.getJdbcSQLException > > DbException.java:172 org.h2.message.DbException.get > > DbException.java:149 org.h2.message.DbException.get > > Parser.java:4900 > org.h2.command.Parser.readTableOrView > > Parser.java:1117 > org.h2.command.Parser.readTableFilter > > Parser.java:1724 > > org.h2.command.Parser.parseSelectSimpleFromPart > > Parser.java:1832 > > org.h2.command.Parser.parseSelectSimple > > Parser.java:1718 > org.h2.command.Parser.parseSelectSub > > Parser.java:1560 > > org.h2.command.Parser.parseSelectUnion > > Parser.java:1548 org.h2.command.Parser.parseSelect > > Parser.java:415 > org.h2.command.Parser.parsePrepared > > Parser.java:289 org.h2.command.Parser.parse > > Parser.java:261 org.h2.command.Parser.parse > > Parser.java:226 > org.h2.command.Parser.prepareCommand > > Session.java:437 > org.h2.engine.Session.prepareLocal > > Session.java:380 > org.h2.engine.Session.prepareCommand > > JdbcConnection.java:1138 > > org.h2.jdbc.JdbcConnection.prepareCommand > > JdbcPreparedStatement.java:70 > > org.h2.jdbc.JdbcPreparedStatement.<init> > > JdbcConnection.java:267 > > org.h2.jdbc.JdbcConnection.prepareStatement > > jdbc.clj:474 > clojure.java.jdbc/prepare-statement > > RestFn.java:425 clojure.lang.RestFn.invoke > > AFn.java:163 clojure.lang.AFn.applyToHelper > > RestFn.java:132 clojure.lang.RestFn.applyTo > > core.clj:621 clojure.core/apply > > jdbc.clj:670 > clojure.java.jdbc/with-query-results* > > db.clj:216 korma.db/exec-sql > > db.clj:239 korma.db/do-query[fn] > > jdbc.clj:302 > clojure.java.jdbc/with-connection* > > db.clj:238 korma.db/do-query > > core.clj:476 korma.core/exec > > db.clj:21 guestbook.models.db/get-messages > > home.clj:12 guestbook.routes.home/home-page > > RestFn.java:397 clojure.lang.RestFn.invoke > > home.clj:34 guestbook.routes.home/fn > > core.clj:94 compojure.core/make-route[fn] > > core.clj:40 compojure.core/if-route[fn] > > core.clj:25 compojure.core/if-method[fn] > > core.clj:107 compojure.core/routing[fn] > > core.clj:2443 clojure.core/some > > core.clj:107 compojure.core/routing > > RestFn.java:139 clojure.lang.RestFn.applyTo > > core.clj:619 clojure.core/apply > > core.clj:112 compojure.core/routes[fn] > > core.clj:107 compojure.core/routing[fn] > > core.clj:2443 clojure.core/some > > core.clj:107 compojure.core/routing > > RestFn.java:139 clojure.lang.RestFn.applyTo > > core.clj:619 clojure.core/apply > > core.clj:112 compojure.core/routes[fn] > > handler.clj:53 > > guestbook.handler/template-error-page[fn] > > middleware.clj:44 > > noir.util.middleware/wrap-request-map[fn] > > keyword_params.clj:32 > > ring.middleware.keyword-params/wrap-keyword-params[fn] > > nested_params.clj:70 > > ring.middleware.nested-params/wrap-nested-params[fn] > > params.clj:58 > > ring.middleware.params/wrap-params[fn] > > middleware.clj:12 > hiccup.middleware/wrap-base-url[fn] > > format_params.clj:98 > > ring.middleware.format-params/wrap-format-params[fn] > > format_params.clj:98 > > ring.middleware.format-params/wrap-format-params[fn] > > format_response.clj:113 > > ring.middleware.format-response/wrap-format-response[fn] > > multipart_params.clj:107 > > ring.middleware.multipart-params/wrap-multipart-params[fn] > > validation.clj:135 > > noir.validation/wrap-noir-validation[fn] > > cookies.clj:66 noir.cookies/noir-cookies[fn] > > cookies.clj:171 > > ring.middleware.cookies/wrap-cookies[fn] > > session.clj:141 noir.session/noir-flash[fn] > > flash.clj:31 > ring.middleware.flash/wrap-flash[fn] > > session.clj:96 noir.session/noir-session[fn] > > session.clj:85 > > ring.middleware.session/wrap-session[fn] > > Var.java:415 clojure.lang.Var.invoke > > reload.clj:18 > > ring.middleware.reload/wrap-reload[fn] > > stacktrace.clj:17 > > ring.middleware.stacktrace/wrap-stacktrace-log[fn] > > stacktrace.clj:80 > > ring.middleware.stacktrace/wrap-stacktrace-web[fn] > > jetty.clj:18 > ring.adapter.jetty/proxy-handler[fn] > > (Unknown Source) > > > ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle > > > > HandlerWrapper.java:116 > > org.eclipse.jetty.server.handler.HandlerWrapper.handle > > Server.java:363 > > org.eclipse.jetty.server.Server.handle > > AbstractHttpConnection.java:483 > > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest > > AbstractHttpConnection.java:920 > > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete > > AbstractHttpConnection.java:982 > > > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete > > > HttpParser.java:635 > > org.eclipse.jetty.http.HttpParser.parseNext > > HttpParser.java:235 > > org.eclipse.jetty.http.HttpParser.parseAvailable > > AsyncHttpConnection.java:82 > > org.eclipse.jetty.server.AsyncHttpConnection.handle > > SelectChannelEndPoint.java:628 > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle > > SelectChannelEndPoint.java:52 > > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run > > QueuedThreadPool.java:608 > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob > > QueuedThreadPool.java:543 > > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run > > Thread.java:744 java.lang.Thread.run > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google > Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to clojure+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > World Singles, LLC. -- http://worldsingles.com/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.