I did not touch the  ~/.lein/profiles.clj file. 

I got things to work by removing everything related to Timbre. I would 
guess that I had some kind of naming class between Timbre and 
clojure.tools.logging. I decided to just use clojure.tools.logging, and 
that seems to have fixed the problem. 


On Monday, December 24, 2018 at 12:41:21 PM UTC-5, Sean Corfield wrote:
>
> Did you change your ~/.lein/profiles.clj file? That’s the most common 
> cause of mysterious startup failures with Leiningen it seems. Try 
> removing/renaming that file and see if your problems go away.
>
>  
>
> If you have more of the stacktrace to share (via pastebin or a gist etc), 
> that might help folks offer suggestions.
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
> ------------------------------
> *From:* clo...@googlegroups.com <javascript:> <clo...@googlegroups.com 
> <javascript:>> on behalf of lawrence...@gmail.com <javascript:> <
> lawrence...@gmail.com <javascript:>>
> *Sent:* Monday, December 24, 2018 8:39:11 AM
> *To:* Clojure
> *Subject:* Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main" 
>  
> I'm not sure what I did, but suddenly I'm getting this:
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main"
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "Thread-0"
>
> I had been using println to do some debugging, but then I added :
>
>                  [com.taoensso/timbre "4.10.0"]
>
> I think that is the last think I did. Then I did: 
>
> lein uberjar
>
> And then I tried to run that from the command line. 
>
> I've added a bunch of logging to try to get a stacktrace, but none of this 
> is working so far: 
>
> (defn -main [& args]
>
>   (slingshot/try+
>
>    ;; 2017-10-04 -- see this:
>    ;; 
> https://stackoverflow.com/questions/28908835/ssl-peer-shut-down-incorrectly-in-java
>    (System/setProperty "https.protocols" "TLSv1.1")
>    
>    (.addShutdownHook (Runtime/getRuntime)
>                      (Thread.
>                       #(do (error "addShutdownHook triggered. This app is 
> shutting down.")
>                            (stop))))
>
>    ;; 2017-07-12 -- stealing code from here:
>    ;; https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions
>    ;; Assuming require [clojure.tools.logging :as log]
>    (Thread/setDefaultUncaughtExceptionHandler
>     (reify Thread$UncaughtExceptionHandler
>       (uncaughtException [_ thread ex]
>         (log "the app has died ")
>         (log ex)
>         (log "Uncaught background exception on thread " (.getName thread) 
> " Caught by Thread/setDefaultUncaughtExceptionHandler in core/main.")
>         (System/exit 1))))
>
>    (slingshot/try+
>     (start)
>     (catch Exception e
>       (stack/parse-exception e)
>       (log (str e))
>       (log "the app has died!")
>       (System/exit 1))
>     (catch Throwable t
>       (log t)
>       (log "the app has died!")
>       (System/exit 1))
>     (catch Object o
>       (log o)
>       (log "the app has died!")
>       (System/exit 1)))))
>
>
> And yet all I get is:
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main"
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "Thread-0"
>
> Somehow the other lines that I try to print never get called. Nor my call 
> to my log function which should give me a stacktrace. 
>
> What is the obvious thing to do here?
>
>
>
>
>
>
> -- 
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to