Cannot validate this method because the domain mapping for the return type (XXXProxy) could not be resolved to a domain type Add @SuppressWarnings("requestfactory") to dismiss.

Starting with GWT 2.4, RequestFactory interfaces must be validated before they can be used by the RequestFactory server code or JVM-based clients. This document explains the mechanisms for validating those interfaces.

I have done but came out some error in Proxy and Request class.
like that:

Cannot validate this method because the domain mapping for the return type (XXXProxy) could not be resolved to a domain type Add @SuppressWarnings("requestfactory") to dismiss.
Could not find domain method similar to java.lang.Integer countUsers()。

Help！I have passed for using Implementing a service in an entity class
but can't pass Using Locator and ServiceLocator.

com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
严重: Unexpected error
java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the com.geogre.shared.DemoRfLocateRequestFactory RequestFactory type
at com.google.web.bindery.requestfactory.vm.impl.Deobfuscator$Builder.load(Deobfuscator.java:59)
at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.updateDeobfuscator(ResolverServiceLayer.java:43)
at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRequestFactory(ResolverServiceLayer.java:176)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:207)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)
at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Pragma: no-cache
Cache-Control: no-cache
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1420

if I use @Service instead，come out with “Could not find domain method similar to " edit error after rebuilt
–
ZhouChang XuJan 12 '12 at 6:06

and error "The RequestFactory ValidationTool must be run for the XXX RequestFactory type"
–
ZhouChang XuJan 12 '12 at 6:21

Make sure you are running the annotation processor tool - and make sure that your domain type actually has the method in question, for example if @Service(User) UserSericeRequest has a persist() method, then User must have one - and you shouldn't be using a ServiceLocator. Can you update your post to have proxies and requests with annotations that make sense, the service and entities that they refer to, and the full error message you get with that setup - it'll make it easier to offer suggestions.
–
Colin AlworthJan 12 '12 at 6:36

thx and I post the error just now, about your idea"make sure that your domain type actually has the method in question, for example if @Service(User) UserSericeRequest has a persist() method, then User must have one ",e...I want to us Locator and ServiceLocator,I don't want to implement persistence code in an entity itself.
–
ZhouChang XuJan 12 '12 at 6:59