-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE on connect with embedded nREPL server #447
Comments
Oh right, forgot to mention that you need to run it as a standalone app (e.g. from an uberjar) rather than from |
I'm having this problem too. I don't know which commit specifically broke this, but reverting to And, as with the original reporter, we are running without lein. It's not an uberjar, but effectively the same thing. (https://github.com/orb/lein-metajar) |
A little more investigation. Given this
And this source:
I get a failure with with
Changing the cider link to be more resolves the problem:
I haven't looked at the code to see why this might cause the problem, but this is a good workaround for now, at the very least. |
That's likely related to the deferred middleware changes introduced by @vspinu in 0.16. His PR should give you a good idea what exactly caused this I guess. |
Ops I forgot to post it - #438 |
This problem is related but different from what I have reported in the pull - the parallel loading of middleware, which is now fixed. The fact that splitting |
This issue bit me as well. @orb's workaround helped. Should I make a PR mentioning this issue in the embedding-nrepl-in-your-app instructions, at least until it's resolved? |
@daveliepmann It'd be best to solve this #464 I guess, but anything's better than nothing until a proper fix. |
Per Bozhidar in clojure-emacs#447 (comment) we are documenting the necessity of manual namespace resolution until clojure-emacs#464 is resolved.
Per Bozhidar in #447 (comment) we are documenting the necessity of manual namespace resolution until #464 is resolved.
Any progress here? With
otherwise I am getting NPE. |
I am seeing an NPE even after applying this workaround when launched from an uberjar. |
I've been able to track it down (the failure of the workaround) to some kind of bad interaction with another library being on the classpath. |
It wound up being a transitive dependency that was |
That's weird. I'm glad you managed to work this out! |
I'm using |
@jiacai2050 A while ago the coordinates of |
I'm working in a project that uses @orb 's workaround from this issue to start a REPL in a Tomcat server:
I'd like to add more middleware to the default list, specifically |
Here's what I ended up with. Open to suggestions if there's a better approach.
|
Looks like a good approach to me. Still, at some point we'll have to tackle the underlying issue with the deferred middleware loading. |
Ty @agriffis , this workaround is still working now. |
Today the workaround for me, for |
Expected behavior
Embedding an nREPL server as described in https://github.com/clojure-emacs/cider-nrepl#via-embedding-nrepl-in-your-app works.
Actual behavior
With version 0.15.x this still worked but with 0.16.0-SNAPSHOT (specifically version
bd7b2bc4c780549594bd7f03c772465216c1e9ca
), the server runs into aNullPointerException
when a client connects, like this:Steps to reproduce the problem
Environment & Version information
cider-nrepl version
0.16.0-SNAPSHOT (
bd7b2bc4c780549594bd7f03c772465216c1e9ca
)Java version
1.8
Operating system
Linux
The text was updated successfully, but these errors were encountered: