Using Clojure 1.10 with Storm 1.x

I’m working on a mixed Java/Clojure codebase, which is run on top of Storm (1.2.3, currently).
That version of Storm has a dependency on Clojure 1.7, and since the worker code is loaded by Storm itself, Clojure 1.7 is what I get when loading Clojure code for interop, despite Clojure 1.10 being included as a dependency.

This is preventing me from using e.g, Spec, which would be quite useful for this code.

Has anyone encountered such a problem before, and found a way around it? Basically, I’m looking for a way to get the 1.10 classes when I do an import; or similar.

I’m running on JDK8, so a custom class loader might be a solution, but I haven’t found any way to achieve this that way, either.

Any ideas would be appreciated!

Can’t you just force the dependency on maven or similar, maybe excluding Storm dependency? I can provide an example in that case.

The issue is that this jar is loaded by Storm itself, and so the 1.7 jar is already in the classpath before my artifact is even loaded.

This might be too simple, I don’t have experience with Storm, but you could try to force it by setting the CLASSPATH environment variable to point at the Clojure 1.10 jar.

I will try to talk to the ops guys and see if they can do it. I don’t have direct access to the platform itself, which is why I was thinking about some custom class loader hack or similar, but I haven’t found a suitable way to do it from within the code (yet, anyway)

Can you download the storm source and rebuild it yourself with clojure 1.10?

I’ll check with the infra guys whether that would work for them, I think it might be a good choice. Thanks!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.