taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 131 forks source link

Error upgrading from 2.7.0 to 2.9.0 #123

Closed yayitswei closed 9 years ago

yayitswei commented 9 years ago

I'm now seeing this error when running my app:

java.lang.IllegalArgumentException: No matching method: sha1Hex, compiling:(taoensso/carmine.clj:142:20)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6632)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.analyze(Compiler.java:6406)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)

It seems to be a dependency issue because carmine 2.9.0 works my other projects. How would I look for a conflict?

This is on Clojure 1.6.0.

Also are messages between 2.7.0 and 2.9.0 compatible? I'm getting a thaw error from nippy when I try to send messages between differing versions, but I'm not sure if it's because of the version conflict.

ptaoussanis commented 9 years ago

Hi Wei,

It seems to be a dependency issue because carmine 2.9.0 works my other projects. How would I look for a conflict?

It does sound like a dependency conflict. I'd check your lein deps :tree and pay special attention to [commons-codec/commons-codec]. Carmine 2.9.0 uses [commons-codec/commons-codec "1.10"].

Let me know if that solves the problem?

Also are messages between 2.7.0 and 2.9.0 compatible? I'm getting a thaw error from nippy when I try to send messages between differing versions, but I'm not sure if it's because of the version conflict.

Carmine 2.9.0 uses a newer version of Nippy which uses a new compression method by default.

So Carmine 2.9.x should be able to read messages from 2.7.x, but Carmine 2.7.x will only be able to read messages from 2.9.x if you manually bump the Nippy version on the 2.7.x system.

Does that make sense? Are your thaw errors occurring when trying to read a 2.9.x message on a 2.7.x system? In that case, just bump the Nippy dependency on the 2.7.x system to the latest release ([com.taoensso/nippy "2.7.1"]).

If you're seeing thaw errors somewhere else, please get me more details including the data type and the specific error message/s you're seeing.

Thanks! Cheers :-)

yayitswei commented 9 years ago

Hi Peter, I'm always amazed how quickly you can respond to these things. What's your secret? :)

It certainly was a dependency conflict, with com.cemerick/friend which uses [commons-codec "1.6"].

Yes, I was writing from Carmine 2.9 and reading with 2.7, but the issue is resolved since both systems are now on Carmine 2.9.

Thanks for your help!

ptaoussanis commented 9 years ago

What's your secret? :)

Compatible timezones, maybe? :-)

Anyway, you're very welcome! And happy to see the issue was easily resolved.

Cheers!

glittershark commented 9 years ago

Just happened upon this issue myself, but I can't seem to get it to go away - I've manually specified commons-codec 1.10 in my project.clj and lein deps :tree | grep commons-codec prints only [commons-codec "1.10"]

ptaoussanis commented 9 years ago

Hi Griffin, try lein clean?

glittershark commented 9 years ago

Nope, still the same error. Removed the folder containing commons-codec in ~/.m2, too, and that didn't help

glittershark commented 9 years ago

ugh.

  1. Created a brand new, empty project. added carmine. Same error
  2. Fiddled with versions of both clojure and carmine. Same error
  3. Apparently lein deps :tree doesn't print dependencies that are getting pulled in from plugins in ~/.lein/profiles.clj. My offender was [refactor-nrepl "0.3.0-SNAPSHOT"]

I may well be done with this whole Clojure thing.

glittershark commented 9 years ago

@ptaoussanis tl;dr it wasn't your fault

ptaoussanis commented 9 years ago

No problem Griffin, happy you found the solution. And thanks for reporting back, appreciate that.

I never use profiles.clj so can't be sure, but lein deps :tree not printing profiles.clj info seems like a bug (or at least omission) to me. Maybe open an issue against Leiningen?

I may well be done with this whole Clojure thing.

I hope not, getting started is usually the roughest bit. Once your environment is up+running, and your toolchain working - the language itself is rock solid & a whole lot of fun to work with IMO.

Getting to the working environment + toolchain can still be a bit of a pita though. Especially (but not exclusively) for folks new to the lang.

Anyway, best of luck! Let me know if you run into any trouble with Carmine that you think I may be able to assist with.

Cheers :-)