problem with spy memcached vbukcets Netty dependency
Hello,
I'm getting
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.setHeader(Ljava/lang/String;Ljava/lang/String;)V
at net.spy.memcached.vbucket.BucketMonitor.prepareRequest(BucketMonitor.java:134)
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #ff1813}
span.s1 {text-decoration: underline ; color: #0a1c8c}
span.Apple-tab-span {white-space:pre}
at net.spy.memcached.vbucket.BucketMonitor.startMonitor(BucketMonitor.java:96)
at net.spy.memcached.vbucket.ConfigurationProviderHTTP.subscribe(ConfigurationProviderHTTP.java:176)
When I try to use prerelease spymeached vBucket
I tried adding the netty dependecy from jboss on maven but it did not work. I tried differnet versions (3.2.4.Final 3.2.2 and 3.1.5.GA) none of them worked
any idea what the problem might be?
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #ff1813}
The dependencies are:
"log4j:log4j:jar:1.2.15", "jmock:jmock:jar:1.2.0", "junit:junit:jar:4.4", "org.jboss.netty:netty:jar:3.1.5.GA", "org.codehaus.jettison:jettison:jar:1.1", "commons-codec:commons-codec:jar:1.4"
The runtime dependencies are log4j, netty, jettison and apache commons-codec. Sorry for not having this posted earlier. I'll update the wiki.
Is it possible to update netty to a more recent version like e.g. 3.2.5.Final? One project uses this version and I cannot downgrade to an older version of netty (at least not to 3.1.5).
This issue applies also to membase 1.7.1 btw.
I will run this through the Spymemcached list and see if anyone objects to doing this. It makes sense, but I would hate to change the dependency for you and have 20 other people complain that their application no longer works.
Another option for you is to recompile Spymemcached with the later version of the jar. I'm pretty sure there is only one function that needs to change and all you would have to do is type cast from a Object to a String (or maybe it was the other way around).
I'll post back here when I figure out what we decide to do. In the worst case scenario I could maybe build a special jar for you.
For the purposes of the thread, Martin's contributed a change that will allow us to use both versions of Netty transparently. We'll be adding this to 2.7 and 2.8!
It worked with version
3.1.5.GA
I might have forgotten to refresh classpath
with other versions it did not work