Closed maravillas closed 10 years ago
When running as an uberjar it looks like any crashes don't show the stack trace, but since I've subsequently altered the server to run in development mode (for issue #4), it becomes apparent what the issue is when running http://programming-enchiladas.destructuring-bind.org/maravillas/cbad41ed792d2a0887fe :
java.lang.NullPointerException
string.clj:99 clojure.string/replace
page.clj:14 enchilada.util.page/add-anchors
canvas.clj:30 enchilada.views.canvas/meta-info
canvas.clj:43 enchilada.views.canvas/render-page
canvas.clj:70 enchilada.controllers.canvas/fn
core.clj:99 compojure.core/make-route[fn]
core.clj:45 compojure.core/if-route[fn]
core.clj:30 compojure.core/if-method[fn]
core.clj:112 compojure.core/routing[fn]
core.clj:2515 clojure.core/some
core.clj:112 compojure.core/routing
RestFn.java:139 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:117 compojure.core/routes[fn]
core.clj:112 compojure.core/routing[fn]
core.clj:2515 clojure.core/some
core.clj:112 compojure.core/routing
RestFn.java:139 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
core.clj:117 compojure.core/routes[fn]
keyword_params.clj:35 ring.middleware.keyword-params/wrap-keyword-params[fn]
nested_params.clj:84 ring.middleware.nested-params/wrap-nested-params[fn]
params.clj:64 ring.middleware.params/wrap-params[fn]
multipart_params.clj:118 ring.middleware.multipart-params/wrap-multipart-params[fn]
flash.clj:35 ring.middleware.flash/wrap-flash[fn]
session.clj:98 ring.middleware.session/wrap-session[fn]
gzip.clj:69 ring.middleware.gzip/wrap-gzip[fn]
cache.clj:72 enchilada.middleware.cache/wrap-cache-control[fn]
middleware.clj:12 hiccup.middleware/wrap-base-url[fn]
params.clj:64 ring.middleware.params/wrap-params[fn]
Var.java:379 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$ff19274a.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
Basically, because there is no description on the gist, the NPE is thrown because the add-anchors
method doesn't do any null-checking... whoopsie
See http://programming-enchiladas.destructuring-bind.org/maravillas/cbad41ed792d2a0887fe (from https://gist.github.com/maravillas/cbad41ed792d2a0887fe), which is a fork of [https://gist.github.com/swannodette/5903001(https://gist.github.com/swannodette/5903001).