((:close foo))
Jan 11, 2019 1:16:20 PM io.netty.util.concurrent.DefaultPromise notifyListener0
WARNING: An exception was thrown by aleph.netty$wrap_future$reify__16507.operationComplete()
java.lang.ExceptionInInitializerError
at manifold.deferred.Deferred.success(deferred.clj:398)
at manifold.deferred$success_BANG_.invokeStatic(deferred.clj:243)
at manifold.deferred$success_BANG_.invoke(deferred.clj:240)
at aleph.netty$wrap_future$reify__16507.operationComplete(netty.clj:199)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:94)
at io.netty.util.concurrent.MultithreadEventExecutorGroup$1.operationComplete(MultithreadEventExecutorGroup.java:117)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:248)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: clojure/lang/PersistentArrayMap
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at clojure.lang.RT.classForName(RT.java:2207)
at clojure.lang.RT.classForName(RT.java:2216)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:324)
at clojure.lang.LispReader$EvalReader.invoke(LispReader.java:1322)
at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:853)
at clojure.lang.LispReader.read(LispReader.java:285)
at clojure.lang.LispReader.read(LispReader.java:220)
at clojure.lang.LispReader.access$200(LispReader.java:41)
at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:954)
at clojure.lang.LispReader.read(LispReader.java:285)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1398)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:1243)
at clojure.lang.LispReader.read(LispReader.java:285)
at clojure.lang.LispReader.read(LispReader.java:220)
at clojure.lang.LispReader.access$200(LispReader.java:41)
at clojure.lang.LispReader$EvalReader.invoke(LispReader.java:1301)
at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:853)
at clojure.lang.LispReader.read(LispReader.java:285)
at clojure.lang.LispReader.read(LispReader.java:216)
at clojure.lang.LispReader.read(LispReader.java:205)
at clojure.lang.RT.readString(RT.java:1874)
at clojure.lang.RT.readString(RT.java:1869)
at manifold.deferred.Deferred$fn__3629.<clinit>(deferred.clj:398)
... 16 more
Any way to fix it?{org.clojure/clojure {:mvn/version "1.10.0"}
yada {:mvn/version "1.2.16"}
aleph {:mvn/version "0.4.6"}
bidi {:mvn/version "2.1.5"}
integrant {:mvn/version "0.7.0"}}
java --version 4.5m Thu Dec 27 21:59:03 2018
java 11.0.1 2018-10-16 LTS
I wanted to ask what is in foo
, but i see there is a Caused by: java.lang.ClassNotFoundException: clojure/lang/PersistentArrayMap
Not sure what to do about this
foo
is (yada/listener handler aleph-options)
which return fn
to close server
Ah I see. I don't know sorry
But as I understand it is aleph bug and this fn is what aleph return to close the server
no problem, thank you for trying
it could be something about java version maybe
You could try to start a normal aleph server and close it to see if that works? For us this works (on different clojure and java) version. But if that does work it might be yada related?
hmm I have to figure out how to start / close aleph without yada 😉
give me a sec
From the readme
(require '[aleph.http :as http])
(defn handler [req]
{:status 200
:headers {"content-type" "text/plain"}
:body "hello!"})
(http/start-server handler {:port 8080})
I think the start-server returns that close fn
Oh actually not true
We stop it like this
:stop [server-instance (do (log/info "stopping Server on port" port)
(.close server-instance)
But older version maybe(defn handler [req]
{:status 200
:headers {"content-type" "text/plain"}
:body "hello!"})
(def foo (http/start-server handler {:port 8080}))
(.close foo)
Jan 11, 2019 1:33:05 PM io.netty.util.concurrent.DefaultPromise notifyListener0
WARNING: An exception was thrown by aleph.netty$wrap_future$reify__16507.operationComplete()
java.lang.NoClassDefFoundError: Could not initialize class manifold.deferred.Deferred$fn__3629
at manifold.deferred.Deferred.success(deferred.clj:398)
at manifold.deferred$success_BANG_.invokeStatic(deferred.clj:243)
at manifold.deferred$success_BANG_.invoke(deferred.clj:240)
at aleph.netty$wrap_future$reify__16507.operationComplete(netty.clj:199)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:94)
at io.netty.util.concurrent.MultithreadEventExecutorGroup$1.operationComplete(MultithreadEventExecutorGroup.java:117)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:248)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
https://github.com/ztellman/aleph/issues/365 it is probably this issue
But not sure why I have this issue and you not 🙂
Can you paste your versions?
Do you use Java 11?
@whoneedszzz Did you have this issue ? ^
@kwladyka No for the app it works we are using java 8
and an older clojure version 1.8
The root cause of the issue was described here: https://github.com/ztellman/aleph/pull/425 The fix is not merged yet, updates to manifold thread factories are (but that’s just a part of the puzzle)
But the point is how can I live with it today? 😉
any workaround?
Just It will be great to be able to reload server when developing
Instead kill REPL / start REPL
branch kachayev:ft-gracefull-shutdown
has this bug fixed?
Not sure about that, I moved the fix to a separate branch on purpose (to make it easier to merge to master). Need to check if it’s still included there. In fact, you can ignore those error messages :) That’s annoying, but it does no harm to the functionality itself: it just fails to deliver notification that the operation is already completed (which means that’s the server is closed)
hmm super strange thing happen. I made a break to eat dinner and now I don’t have this error
thanks for info it doesn’t affect closing the server. I didn’t realise that.
now I have it again wow. I changed nothing
ha I found something! I will describe it in issue in +1h
@kwladyka There's nothing wrong with the method that the yada manual describes. I'm using it right now
@whoneedszzz i have this issue https://github.com/ztellman/aleph/pull/425 also when use yada directly as in the doc. But this issue appear only when you didn’t open website even once.