Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting stacktrace on lein ring server #44

Closed
devinus opened this issue Aug 21, 2012 · 6 comments
Closed

Getting stacktrace on lein ring server #44

devinus opened this issue Aug 21, 2012 · 6 comments

Comments

@devinus
Copy link

devinus commented Aug 21, 2012

urbite git:master ❯ uname -a                                                                                         ⏎ ✖ ✱ ◼
Darwin macbook.local 12.0.0 Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64 x86_64
urbite git:master ❯ java -version                                                                                      ✖ ✱ ◼
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)
urbite git:master ❯ clj                                                                                                ✖ ✱ ◼
Clojure 1.4.0
user=> ^C%                                                                                                                   urbite git:master ❯ lein version                                                                                     ⏎ ✖ ✱ ◼
Leiningen 2.0.0-preview8 on Java 1.7.0_06 Java HotSpot(TM) 64-Bit Server VM
urbite git:master ❯ lein ring server                                                                                   ✖ ✱ ◼
2012-08-21 13:35:44.940:INFO:oejs.Server:jetty-7.6.1.v20120215
Started server on port 3000
2012-08-21 13:35:44.984:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3000
Exception: java.lang.NullPointerException: null
                                      stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
                                      stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
                                          reload.clj:18 ring.middleware.reload/wrap-reload[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:111 org.eclipse.jetty.server.handler.HandlerWrapper.handle
                                        Server.java:349 org.eclipse.jetty.server.Server.handle
                        AbstractHttpConnection.java:452 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest
                        AbstractHttpConnection.java:884 org.eclipse.jetty.server.AbstractHttpConnection.headerComplete
                        AbstractHttpConnection.java:938 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete
                                    HttpParser.java:634 org.eclipse.jetty.http.HttpParser.parseNext
                                    HttpParser.java:230 org.eclipse.jetty.http.HttpParser.parseAvailable
                            AsyncHttpConnection.java:76 org.eclipse.jetty.server.AsyncHttpConnection.handle
                         SelectChannelEndPoint.java:609 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle
                          SelectChannelEndPoint.java:45 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run
                              QueuedThreadPool.java:599 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob
                              QueuedThreadPool.java:534 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run
                                        Thread.java:722 java.lang.Thread.run

Exception: java.lang.NullPointerException: null
                                      stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
                                      stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
                                          reload.clj:18 ring.middleware.reload/wrap-reload[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:111 org.eclipse.jetty.server.handler.HandlerWrapper.handle
                                        Server.java:349 org.eclipse.jetty.server.Server.handle
                        AbstractHttpConnection.java:452 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest
                        AbstractHttpConnection.java:884 org.eclipse.jetty.server.AbstractHttpConnection.headerComplete
                        AbstractHttpConnection.java:938 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete
                                    HttpParser.java:634 org.eclipse.jetty.http.HttpParser.parseNext
                                    HttpParser.java:230 org.eclipse.jetty.http.HttpParser.parseAvailable
                            AsyncHttpConnection.java:76 org.eclipse.jetty.server.AsyncHttpConnection.handle
                         SelectChannelEndPoint.java:609 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle
                          SelectChannelEndPoint.java:45 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run
                              QueuedThreadPool.java:599 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob
                              QueuedThreadPool.java:534 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run
                                        Thread.java:722 java.lang.Thread.run
@weavejester
Copy link
Owner

Your project.clj file is incorrect. You haven't set the :handler option correctly.

This error could probably require a clearer exception.

@devinus
Copy link
Author

devinus commented Aug 21, 2012

Indeed. As soon as I added :ring {:handler urbite.web/app} it worked.

@weavejester
Copy link
Owner

Better error message for this in Lein-Ring 0.7.4

@devinus
Copy link
Author

devinus commented Aug 24, 2012

Thanks @weavejester!

@ilyabo
Copy link

ilyabo commented Nov 27, 2013

Error message is still not very helpful in 0.8.8:

java.lang.NullPointerException: null
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]

Needs googling to find out what the reason is.

@micrub
Copy link

micrub commented Nov 2, 2014

Same here , error message is confusing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants