quarks
quarks

Reputation: 35276

NoSuchMethodError: com.google.appengine.api.memcache.ErrorHandlers.getConsistentLogAndContinue

Why do I get this error when I try to access a "resource" in my web service:

java.lang.NoSuchMethodError: com.google.appengine.api.memcache.ErrorHandlers.getConsistentLogAndContinue(Ljava/util/logging/Level;)Lcom/google/appengine/api/memcache/LogAndContinueErrorHandler;
    at com.googlecode.objectify.cache.EntityMemcache.<init>(EntityMemcache.java:178)
    at com.googlecode.objectify.ObjectifyFactory.<init>(ObjectifyFactory.java:69)
    at com.mycompany.mywebservice.core.daoimpl.OfyFactory.<init>(OfyFactory.java:41)
    at com.mycompany.mywebservice.core.daoimpl.OfyService.<clinit>(OfyService.java:14)
    at com.mycompany.mywebservice.rest.blob.serviceimpl.BlobServiceImpl.getBlobInfo(BlobServiceImpl.java:78)
    at com.mycompany.mywebservice.rest.blob.BlobController.getBlob(BlobController.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:115)
    at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

I'm using GAE version 1.7.4 and Objectify v 4.0a4

Here's where the error is thrown:

result = ofy().load().type(BlobInfo.class).filter("id", key).first().get();

Upvotes: 0

Views: 269

Answers (1)

Mark Doyle
Mark Doyle

Reputation: 4874

Looks like there's a chance you have some old App Engine SDK jars in your classpath. Check your WEB-INF/lib folder and clean out any old app engine versions that might have somehow got there.

Looking here:

http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/memcache/ErrorHandlers.java?r=284

It seems the methods added since SDK 1.6.4.1 so chances are you have something older than that hanging around.

I'm not sure but I guess the Objectify you use is from after that. In any case 4.0a4 is not the most recent and it would be wise to update it.

Upvotes: 1

Related Questions