IntelliJ/Cursive unexpected issue

194 views Asked by At

Sometimes I try to run a Clojure program in IntelliJ and I get the following error:

(.deleteOnExit (java.io.File. "/home/matan.bl/.IdeaIC15/system/tmp/form-init7886362698780123516.clj"))
(do (set! *warn-on-reflection* nil)
    (set! *warn-on-reflection* nil)
    nil
    (clojure.core/doseq [namespace1387 (quote
                                        (sparkling.serialization
                                         sparkling.destructuring))]
      (clojure.core/binding [clojure.core/*out*  clojure.core/*err*]
        (clojure.core/println "Compiling" namespace1387))
      (try
        (clojure.core/compile namespace1387)
        (catch java.lang.Throwable 
            t__8048__auto__ (clojure.core/binding [clojure.core/*out* 
                                                   clojure.core/*err*]
                              (clojure.core/println (.getMessage
                                                     t__8048__auto__)))
            (throw t__8048__auto__))))
    (do nil
        (try
          (clojure.core/require
           (quote  clojure.tools.nrepl.server))
          (catch
              java.lang.Throwable t__11819__auto__
            (clojure.core/println "Error loading"                    
                                  (clojure.core/str (quote  clojure.tools.nrepl.server) ":")
                                  (clojure.core/or (.getMessage t__11819__auto__)
                                                   (clojure.core/type
                                                    t__11819__auto__)))))
        (try  (clojure.core/require (quote complete.core))
              (catch java.lang.Throwable  t__11819__auto__
                (clojure.core/println "Error loading"
                                      (clojure.core/str
                                       (quote
                                        complete.core) ":")
                                      (clojure.core/or (.getMessage t__11819__auto__) 
                                                       (clojure.core/type t__11819__auto__)))))
        nil)
    (clojure.core/let
        [server__11814__auto__ (clojure.tools.nrepl.server/start-server
                                :bind
                                "127.0.0.1" :port 0 :ack-port 42520 :handler
                                (clojure.tools.nrepl.server/default-handler))
         port__11815__auto__   (:port server__11814__auto__)
         repl-port-file__11816__auto__ (clojure.core/apply clojure.java.io/file
                                                           ["/home/matan.bl/projects/af_sparkling-river"
                                                            ".nrepl-port"])
         legacy-repl-port__11817__auto__ (if (.exists  (clojure.java.io/file
                                                        "/home/matan.bl/projects/af_sparkling- river/target"))
                                           (clojure.java.io/file 
                                            "/home/matan.bl/projects/af_sparkling-river/target" "repl-port"))] 
      (clojure.core/when true
        (clojure.core/println
         "nREPL server started on port"
         port__11815__auto__
         "on host"
         "127.0.0.1"
         (clojure.core/str "- nrepl://" "127.0.0.1" ":" port__11815__auto__)))
      (clojure.core/spit 
       (clojure.core/doto repl-port-file__11816__auto__ .deleteOnExit) 
       port__11815__auto__)
      (clojure.core/when
          legacy-repl-port__11817__auto__
        (clojure.core/spit (clojure.core/doto
                               legacy-repl-port__11817__auto__
                             .deleteOnExit)
                           port__11815__auto__))
        (clojure.core/deref (clojure.core/promise))))

Do you have any idea what this error means and how it can be solved?

1

There are 1 answers

0
Arthur Ulfeldt On

I have seen errors like this when typing

(-main ....) 

into the REPL in Cursive-clojure without first clicking on the switch repl to namespace button. Also make sure you have clocked "load file" in the same menu.