为什么当我尝试访问 Web 服务中的“资源”时会出现此错误:
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)
我正在使用 GAE 1.7.4 版和 Objectify v 4.0a4
这是引发错误的地方:
result = ofy().load().type(BlobInfo.class).filter("id", key).first().get();