gorillalabs / sparkling

A Clojure library for Apache Spark: fast, fully-features, and developer friendly
https://gorillalabs.github.io/sparkling/
Eclipse Public License 1.0
448 stars 68 forks source link

A runtime error when Sparkling is used with Ring, Compojure and Elasticsearch-Hadoop #23

Closed hantuzun closed 9 years ago

hantuzun commented 9 years ago

We get a run time error* when we're trying to use Sparkling in an existing project. I've reproduced the same error in this fork of sparkling-getting-started example. The failure is caused by this tiny commit.

The example failing project works fine when I remove Sparkling specific parts. I've demonstrated this in a branch: without-sparkling

How could we fix this problem if we want to keep ring.middleware?


* The error is: java.lang.RuntimeException: No such var: head/head-response, compiling:(ring/middleware/resource.clj:16:11)

The stacktrace we get could be seen in stack-trace.txt.

chrisbetz commented 9 years ago

Looking into this right now and I'm a little puzzled on what you're trying to achieve: Your changes start pulling in a massive dependency tree (including hive, three different jetty versions, etc.). This makes debugging really hard.

However, I found out that you're pulling in ring-core:0.3.11 which is really outdated and not suitable to use with ring-defaults:0.1.5.

So I'd suggest you're cleaning up your dependency tree to whatever makes sense. If the problem persists and really is related to sparkling, please feel free to come back to me.

Happy hacking,

Chris

hantuzun commented 9 years ago

Thanks Chris, we've solved the issue by excluding a lot of our dependencies' dependencies.