Marvin
unread,Jan 6, 2012, 3:00:13 AM1/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jedis
Hi!
I am using Jedis 1.5.2 and RedisStore for session handling. There
is a problem when I was using some methods such as "jedis.exists",
"jedis.hset", "jedis.renamenx" and "jedis.lpush"...etc. Those
function(or method) can be implemented and compiled under eclipse.
However, a nosuchmethod-error will occur when my application is
running on the server using tomcat 7.0.23. Besides, other functions
such as "jedis.set", "jedis.hmset" ,"jedis.rename" and "jedis.ping"...
are working properly.
In conclusion, only part of the Jedis' API with return type String
or Void are working. Others with return type Boolean and Long will
cause a NoSuchMethod error. The exception message and root cause are
as follow:
exception
javax.servlet.ServletException:
com.sun.jersey.api.container.MappableContainerException:
java.lang.NoSuchMethodError: redis.clients.jedis.Jedis.renamenx(Ljava/
lang/String;Ljava/lang/String;)Ljava/lang/Long;
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:
361)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
com.sun.jersey.api.container.MappableContainerException:
java.lang.NoSuchMethodError: redis.clients.jedis.Jedis.renamenx(Ljava/
lang/String;Ljava/lang/String;)Ljava/lang/Long;
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:
74)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:
124)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:
71)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:
111)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:
63)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:
555)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:
514)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:
505)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:
359)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
If this is not an error, what am I doing wrong?
Or someone can give me a little tips for solution.
Thanks!
best regards,
Marvin