Exception running lein interactive - clojure

A project I have been working on has suddenly started throwing exceptions when using leiningen interactive. Running "lein test" is fine, my tests run and pass. The exception only occurs using interactive:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: leiningen.compile/eval-in-project
at clojure.lang.Var.pushThreadBindings(Var.java:339)
at clojure.core$push_thread_bindings.invoke(core.clj:1716)
at leiningen.interactive$interactive.invoke(interactive.clj:75)
at clojure.lang.Var.invoke(Var.java:401)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.core$apply.invoke(core.clj:602)
at leiningen.core$apply_task.invoke(core.clj:262)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:602)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval361.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$script_opt.invoke(main.clj:339)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:413)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
... 5 more
A different Exception is thrown when attempting to connect to the repl:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at clojure.lang.Util.runtimeException(Util.java:165)
at clojure.lang.Reflector.invokeConstructor(Reflector.java:193)
at leiningen.repl$poll_repl_connection$fn__1425.invoke(repl.clj:113)
at leiningen.repl$poll_repl_connection.invoke(repl.clj:113)
at leiningen.repl$repl.invoke(repl.clj:153)
at clojure.lang.Var.invoke(Var.java:401)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.core$apply.invoke(core.clj:602)
at leiningen.core$apply_task.invoke(core.clj:262)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:602)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval361.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$script_opt.invoke(main.clj:339)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:413)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
... 5 more

it looks like the real error is:
" Can't dynamically bind non-dynamic var: leiningen.compile/eval-in-project"
this is caused by one of the changes in 1.3 that makes vars much faster but requires the ones that will be dynamically rebound to be marked with ^dynamic. the version of lein you are using is not compatable with the version of clojure you are using. When I encountered this problem on monday it went away after running:
lein upgrade

Related

Error when updating Axis2 web services from version 1.5.6 to 1.6.3

I used to run my web services on Axis2 V1.5.6. But now I want to run them on Axis2 V1.6.3.
On the 1.5.6 version, my services work well but when I try to use them on the 1.6.3 version, I get this error when I'm calling a method for the first time :
Exception occurred while trying to invoke service method getAllReferentiels
when I glance in my tomcat logs I can see that an exception is raised :
[ERROR] Exception occurred while trying to invoke service method getAllReferentiels
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:121)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.jersey.core.impl.provider.entity.RenderedImageProvider.<clinit>(RenderedImageProvider.java:69)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.jersey.core.reflection.ReflectionHelper$3.run(ReflectionHelper.java:289)
at com.sun.jersey.core.reflection.ReflectionHelper$3.run(ReflectionHelper.java:279)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jersey.spi.service.ServiceFinder$AbstractLazyIterator.hasNext(ServiceFinder.java:697)
at com.sun.jersey.spi.service.ServiceFinder.toClassArray(ServiceFinder.java:549)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:345)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:338)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:162)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:343)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:188)
at com.sun.jersey.api.client.Client.<init>(Client.java:160)
at com.sun.jersey.api.client.Client.create(Client.java:673)
at com.refComp.dao.utils.Neo4jUtil.getClient(Neo4jUtil.java:44)
at com.refComp.dao.utils.Neo4jUtil.getNodesWithLabelInJSONArray(Neo4jUtil.java:140)
at com.refComp.dao.utils.Neo4jUtil.getAllReferentiels(Neo4jUtil.java:411)
at com.refComp.dao.services.impl.RefCompDAOServiceImpl.getAllReferentiels(RefCompDAOServiceImpl.java:43)
at com.refComp.dao.services.RefCompDAOServiceUtil.getAllReferentiels(RefCompDAOServiceUtil.java:29)
at com.refComp.services.impl.RefCompServiceImpl.getXMLReferentielsInString(RefCompServiceImpl.java:314)
at com.refComp.services.RefCompServiceUtil.getXMLReferentielsInString(RefCompServiceUtil.java:57)
at com.refComp.services.ws.ReferentielWS.getAllReferentiels(ReferentielWS.java:30)
... 36 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:122)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
at javax.ws.rs.core.MediaType.<clinit>(MediaType.java:44)
... 65 more
Caused by: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:62)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:155)
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:105)
... 67 more
When I run the method for the second time, I get this error :
Could not initialize class com.sun.jersey.core.impl.provider.entity.RenderedImageProvider
And these logs :
[ERROR] Could not initialize class com.sun.jersey.core.impl.provider.entity.RenderedImageProvider
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:121)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jersey.core.impl.provider.entity.RenderedImageProvider
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.jersey.core.reflection.ReflectionHelper$3.run(ReflectionHelper.java:289)
at com.sun.jersey.core.reflection.ReflectionHelper$3.run(ReflectionHelper.java:279)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jersey.spi.service.ServiceFinder$AbstractLazyIterator.hasNext(ServiceFinder.java:697)
at com.sun.jersey.spi.service.ServiceFinder.toClassArray(ServiceFinder.java:549)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:345)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:338)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:162)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:343)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:188)
at com.sun.jersey.api.client.Client.<init>(Client.java:160)
at com.sun.jersey.api.client.Client.create(Client.java:673)
at com.refComp.dao.utils.Neo4jUtil.getClient(Neo4jUtil.java:44)
at com.refComp.dao.utils.Neo4jUtil.getNodesWithLabelInJSONArray(Neo4jUtil.java:140)
at com.refComp.dao.utils.Neo4jUtil.getAllReferentiels(Neo4jUtil.java:411)
at com.refComp.dao.services.impl.RefCompDAOServiceImpl.getAllReferentiels(RefCompDAOServiceImpl.java:43)
at com.refComp.dao.services.RefCompDAOServiceUtil.getAllReferentiels(RefCompDAOServiceUtil.java:29)
at com.refComp.services.impl.RefCompServiceImpl.getXMLReferentielsInString(RefCompServiceImpl.java:314)
at com.refComp.services.RefCompServiceUtil.getXMLReferentielsInString(RefCompServiceUtil.java:57)
at com.refComp.services.ws.ReferentielWS.getAllReferentiels(ReferentielWS.java:30)
... 36 more
It seems that in both cases, the error is similar. When I use com.sun.jersey.api.client.Client.create(), something goes wrong and the class com.sun.jersey.core.impl.provider.entity.RenderedImageProvider could not be initialized.
I don't know why this error happens. Maybe my archive .aar doesn't fit with the 1.6.3 version (because I use the same for both versions)
I hope someone can help me to understand..
thanks,
Tom
Finally I made it working with adding jersey-bundle-1.19.jar into the lib directory of Axis2 (in webapps) and restart the tomcat.

Exception when trying to quit debug-repl in Clojure

I'm using debug repl https://github.com/GeorgeJahad/debug-repl
When I'm trying to quit the debug repl i've got an error
dr-1-1001 =>(quit-dr)
;;=> Exception$Enumeration$f482e887 vendors.debug_repl.proxy$java.lang.Exception$Enumeration$f482e887.fillInStackTrace (:-1)
maybe this little stacktrace could help
dr-1-1001 => (.printStackTrace *e)
;;=> vendors.debug_repl.proxy$java.lang.Exception$Enumeration$f482e887
at vendors.debug_repl.proxy$java.lang.Exception$Enumeration$f482e887.fillInStackTrace(Unknown Source)
at java.lang.Throwable.(Throwable.java:181)
at java.lang.Exception.(Exception.java:29)
at vendors.debug_repl.proxy$java.lang.Exception$Enumeration$f482e887.(Unknown Source)
at vendors.debug_repl$fn__16719.invoke(debug_repl.clj:86)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3509)
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:417)
at clojure.lang.Compiler.eval(Compiler.java:6647)
at clojure.lang.Compiler.load(Compiler.java:7069)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5027.invoke(core.clj:5561)
at clojure.core$load.doInvoke(core.clj:5560)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5366)
at clojure.core$load_lib$fn__4976.invoke(core.clj:5406)
at clojure.core$load_lib.doInvoke(core.clj:5405)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5444)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:621)
at clojure.core$use.doInvoke(core.clj:5538)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at utils.utils$eval16693.invoke(form-init1922168186769041658.clj:12)
at clojure.lang.Compiler.eval(Compiler.java:6642)
at clojure.lang.Compiler.eval(Compiler.java:6605)
at clojure.core$eval.invoke(core.clj:2883)
at clojure.main$repl$read_eval_print__6581$fn__6584.invoke(main.clj:239)
at clojure.main$repl$read_eval_print__6581.invoke(main.clj:239)
at clojure.main$repl$fn__6590.invoke(main.clj:257)
at clojure.main$repl.doInvoke(main.clj:257)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.main$repl_opt.invoke(main.clj:323)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.Var.applyTo(Var.java:708)
at clojure.main.main(main.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
at user$eval1015.invoke(form-init1922168186769041658.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6642)
at clojure.lang.Compiler.eval(Compiler.java:6632)
at clojure.lang.Compiler.load(Compiler.java:7069)
at clojure.lang.Compiler.loadFile(Compiler.java:7025)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:391)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:708)
at clojure.main.main(main.java:37)
nil
The behavior you are seeing is expected since the quit-dr function throws an exception when called. This is the source for quit-dr taken from here.
(defn quit-dr [ & form]
(reset! element (first form))
(throw quit-dr-exception))
According to what the README shows you should quit the debug-repl by evaluating the empty list ().

lein ritz setup error

I am trying to setup ritz/lein/emacs etc to create a clojure dev environment.
I installed lein plugin install lein-ritz "0.5.0" and added it to my project file. When trying lein ritz I get this exception:
arash#azure:~/programming/onebreaker$ lein ritz
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/eval_init.class or leiningen/core/eval.clj on classpath: (ritz.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.load(Compiler.java:5857)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn_4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at leiningen.core$resolve_task.invoke(core.clj:208)
at leiningen.core$apply_task.invoke(core.clj:258)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval42.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
... 5 more
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/eval_init.class or leiningen/core/eval.clj on classpath:
at clojure.lang.RT.load(RT.java:412)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn_4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at leiningen.ritz$eval68$loading_4414_auto____69.invoke(ritz.clj:1)
at leiningen.ritz$eval68.invoke(ritz.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 44 more
Can you helo me to resolve this?
Have you tried leinigen2?
I'm using leiningen 2.0.0-review10 and have the following in my ~/.lein/profiles.clj file:
{:user {:plugins [
;;...
[lein-ritz "0.5.0"]
;;...
]}}
Running lein ritz results in:
user=> Swank server listening on local port 61428

lein help yields java.lang.reflect.InvocationTargetException

Running lein noir new new-app and lein help causes this long stack trace with many errors. I tried lien self-install after rm -rf ~/.m2 though I still get these.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
... 5 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at clojure.lang.RT.loadClassForName(RT.java:1578)
at clojure.lang.RT.load(RT.java:399)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at leiningen.core$resolve_task.invoke(core.clj:208)
at leiningen.core$apply_task.invoke(core.clj:258)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval42.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 16 more
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at clojure.lang.LazySeq.sval(LazySeq.java:47)
at clojure.lang.LazySeq.seq(LazySeq.java:56)
at clojure.lang.RT.seq(RT.java:450)
at clojure.core$seq.invoke(core.clj:122)
at clojure.core$apply.invoke(core.clj:540)
at clojure.core$mapcat.doInvoke(core.clj:2122)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.util.ns$namespaces_matching.invoke(ns.clj:68)
at leiningen.help__init.load(Unknown Source)
at leiningen.help__init.<clinit>(Unknown Source)
... 43 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at clojure.lang.Reflector.invokeConstructor(Reflector.java:160)
at leiningen.util.ns$namespaces_in_jar.invoke(ns.clj:52)
at clojure.core$map$fn__3699.invoke(core.clj:2096)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
... 52 more
My standard Leiningen fixing process is approximately:
check your internet connection
delete ~/.m2/repository/*
delete /home/project/path/lib/*
lein upgrade
lein deps
this case looks like one of lein's required files is missing, though it can
be difficult to diagnose these problems. if you login to #clojure on irc.freenode.net
they are often helpful in figuring out these sorts of problem more interactively

ExceptionInInitializerError when using leiningen

I'm a beginner getting started with using Clojure and Leiningen, and I've run into a problem trying to use a variety of lein commands. Although $ lein deps works fine, when I tried to use $ lein plugin install <plugin>, or even $lein help, I get the stack trace pasted below. I would guess that this is a setup issue, but I'm having trouble finding information online or finding the right place to start looking. When installing lein I followed the instructions on the Leiningen GitHub page.
Exception in thread "main" java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at clojure.lang.RT.loadClassForName(RT.java:1578)
at clojure.lang.RT.load(RT.java:399)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at leiningen.core$resolve_task.invoke(core.clj:175)
at leiningen.core$apply_task.invoke(core.clj:225)
at leiningen.core$_main.doInvoke(core.clj:294)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:297)
at user$eval42.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 11 more
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: zip file is empty
at clojure.lang.LazySeq.sval(LazySeq.java:47)
at clojure.lang.LazySeq.seq(LazySeq.java:56)
at clojure.lang.RT.seq(RT.java:450)
at clojure.core$seq.invoke(core.clj:122)
at clojure.core$apply.invoke(core.clj:540)
at clojure.core$mapcat.doInvoke(core.clj:2122)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at leiningen.util.ns$namespaces_matching.invoke(ns.clj:67)
at leiningen.help__init.load(Unknown Source)
at leiningen.help__init.<clinit>(Unknown Source)
... 38 more
Caused by: java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at clojure.lang.Reflector.invokeConstructor(Reflector.java:160)
at leiningen.util.ns$namespaces_in_jar.invoke(ns.clj:53)
at clojure.core$map$fn__3699.invoke(core.clj:2096)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
... 47 more
(For the karma ;o) Have you tried deleting the .lein directory and re-running from zero? Sounds like you may have a corrupt zip file cached.