Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread piastkrakow
I asked the same question a year ago. The problem was that I was getting an OutOfMemoryError. This is an Error but it is not an Exception. If you catch all Exceptions, you will still not catch the OutOfMemoryError. You have to catch that too. On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5,

Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-07 Thread Varga Radu
Also solved my problem by adding [com.google.guava/guava "21.0"] to my project.clj On Thursday, 2 March 2017 13:45:29 UTC+1, Dirk Bergmann wrote: > > Had the same issue. Fixed it by upgrading guava dependency to > [com.google.guava/guava "21.0"] > > On Sunday, January 29, 2017 at 3:01:16 AM

Re: GSoC 2017 - KLIPSE

2017-03-07 Thread Yehonathan Sharvit
Hi Maitreya, I'm Yehonathan - the author of Klipse. I'd love to hear your ideas around Klipse and to be your mentor for GSoC 2017. You can reach me at: vie...@gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Alex Miller
If you are getting an OOME there are some JVM flags that can help dump an error file or heap dump, or run arbitrary commands when an error occurs: -XX:ErrorFile=./hs_err_pid.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./java_pid.hprof -XX:OnError=";" -XX:OnOutOfMemoryError=";" That

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Johannes Ahvenniemi
I'm under the impression that setDefaultExceptionHandler still catches OOM errors. Some googling suggests this too. If not, how should I try to catch it? I am running the app on a virtual server with 512mb ram. free -m is showing 30mb free. Lack of memory can be the issue. What would be the

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread lawrence . krubner
To catch OutOfMemoryError s: catch(OutOfMemoryError e) On Tuesday, March 7, 2017 at 5:18:44 PM UTC-5, JokkeB wrote: > > I'm under the impression that setDefaultExceptionHandler still catches OOM > errors. Some googling suggests this too. If not, how should I try to catch > it? > > I am

why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread piastkrakow
This gives me nil: (try (/ 4 0) (catch Exception e (println (parents e This too: (try (/ 4 0) (catch Exception e (println (ancestors e This too: (try (/ 4 0) (catch ArithmeticException e (println (ancestors e How is this possible? Shouldn't Exception be an ancestor? Or, more

Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-07 Thread Paul Gowder
Yeah, this is a recurrent problem---as far as I can determine, several database libraries (at least) have a dependency a layer or two down on an old version of guava; the latest closure compiler seems to be depending on the most recent guava. See eg this issue (which ai've been meaning to

Re: why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread Gary Trakhman
Turns out ancestors works on the class, not the instance: > (ancestors ArithmeticException) #{java.lang.Throwable java.io.Serializable java.lang.Exception java.lang.RuntimeException java.lang.Object} > (ancestors (new ArithmeticException)) nil On Tue, Mar 7, 2017 at 7:05 PM

Re: why doesn't java.lang.ArithmeticException have Exception as a parent?

2017-03-07 Thread piastkrakow
Thanks for that. I couldn't figure this one out. But using your suggestion, I finally get what I expected: (try (/ 4 0) (catch ArithmeticException e (println (ancestors (type e) #{java.lang.Exception java.lang.Throwable java.lang.RuntimeException java.lang.Object java.io.Serializable}

Re: Ensure more concurrency

2017-03-07 Thread lawrence . krubner
https://clojuredocs.org/clojure.core/ensure Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref) This can be read in two contradictory ways. Protecting a ref

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Mark Nutter
I see this thread is going on for a while, and I'll say up front that I don't have any helpful insights. I did see an interesting talk at Abstractions, though, about how to use dtrace to get to the bottom of weird problems like this. The video for that event doesn't seem to be online anywhere, but

clj-bigml

2017-03-07 Thread Myriam Abramson
Is this project still maintained? Does anyone want to fork it to bring it up-to-date? Thanks for any info. -- myriam -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Leiningen, AOT compilation, and classloaders

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
I recently ran into an issue with AOT compilation that I'd like to understand better. A minimal working example (MWE) can be found here . Basically, using `:aot :all` in `project.clj` with `lein trampoline test` results in different classloaders

`extend-protocol` order

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
Does `extend-protocol` guarantee order when used with subtypes? E.g. suppose class Foo implements interface IFoo. Then, extending both Foo and IFoo with protocol Bar: (extend-protocol Bar Foo (do-bar [] "Foo-bar") IFoo (do-bar [] "IFoo-bar")) Is calling `do-bar` on an object

Re: `extend-protocol` order

2017-03-07 Thread Alex Miller
Per the docs at https://clojure.org/reference/protocols, if more than one protocol extension applies and one is derived from the other then the derived one will be used. In other cases (like two independent interfaces), it is undefined and in my experience you will see different ones get

Re: `extend-protocol` order

2017-03-07 Thread 'Tianxiang Xiong' via Clojure
Thanks, that's vey helpful. On Tuesday, 7 March 2017 11:35:12 UTC-8, Alex Miller wrote: > > Per the docs at https://clojure.org/reference/protocols, if more than one > protocol extension applies and one is derived from the other then the > derived one will be used. In other cases (like two

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Kevin Corcoran
On Mon, Mar 6, 2017 at 11:56 PM, JokkeB wrote: > After adding this, I still can't see an exception before the app dies. > I've encountered this before when the Linux "OOM killer" kicks in, which is especially likely if you are running your application on a