English 中文(简体)
在GWT2使用激光器和服务器时出现一些错误。 4)
原标题:Some errors when Using Locator and ServiceLocator in GWT2.4

不能验证这一方法,因为返回类型(XXXProxy)的域制图不能被解决到“再质”的域名上。

从WT开始 2.4. 要求书库接口必须经过验证,才能由请求书库服务器代码或基于证书的客户使用。 本文件解释了验证这些接口的机制。

http://code.google.com/p/google-web-toolkit/wiki/RequestFactory InterfaceValidation”rel=“nofollow”http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation

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

不能验证这一方法,因为返回类型(XXXProxy)的域制图不能被解决到“再质”的域名上。
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.

Mycode:

@ServiceName(value="UserProxy.class", locator="UserServiceLocator.class")
public interface UserServiceRequest extends RequestContext {

    Request<Integer> countUsers();
    Request<Void> generateUsers();
    Request<List<UserProxy>> findAllUsers();
    InstanceRequest<UserProxy, Void> persist();
    InstanceRequest<UserProxy, Void> remove();

}

@ProxyForName(value = "User.class", locator = "UserLocator.class")
public interface UserProxy extends EntityProxy {

    //...setter and getter

    EntityProxyId<UserProxy> stableId();

}

error [debug to use method on server]

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

最佳回答

你似乎以两种方式错误地使用“@serviceName”通知。 如果你想提及一个字面字面,则使用@服务。

@Service(value=MyServiceType.class, locator=MyServiceLocator.class)

如果你想要使用@SERName,你需要全方位的名称。

@ServiceName(value="com.company.server.MyServiceType", locator="com.company.gwt.MyServiceLocator")

“ProxyFor”和“ProxyForName”的情况也是如此,你似乎也错误地使用了这些语言。

无论如何,你可以把请求书全文的服务点放在代理上——这或许应当指用户,而不是用户。

问题回答

暂无回答




相关问题
Refresh the UI in gwt

I have created some custom composite widget, which listens to an events (in my case loginEvent). Once the event is caught the state of the widget changes so as the way it should look (in my case I ...

How to create a development/debug and production setup

I recently deployed inadvertently a debug version of our game typrX (typing races at www.typrx.com - try it it s fun). It was quickly corrected but I know it may happen again. After digging on ...

GWT error at runtime: ....style_0 is null

My code works fine in IE 8, but on firefox 3.5, the javascript fails to load. I used firebug to figure out why, and the error I get is (GWT detailed mode) My suspicion is that some style is not ...

GWT s hosted mode not working

I ve been stumped for a while trying to figure out why my GWT demo app isn t working in hosted mode so I went back and downloaded the Google Web Toolkit again, unzipped it and simply went to the ...

How to disable Google Visualizations Tool Tips?

Does anyone know how to disable the tool-tip boxes that popup when a Google Visualizations chart is clicked (Selected)? Following the sample code at Getting Started with Visualizations, the "...

GWT 2 CssResource how to

I have a GWT 1.7 application and I want to upgrade it to GWT 2 Milestone 2. The application uses 2 big external CSS files. In GWT 1.7 I had a public folder and put both the CSS files in the folder and ...

热门标签