Wednesday, August 2, 2017

Re: GWT Plugin v3.0 and tbroyer maven integration with requestfactory



On Wednesday, August 2, 2017 at 7:24:53 PM UTC+2, Sheldon Damons wrote:
Hi Guys,

I have been investigating migrating our current GWT Project to use gwt-eclipse-plugin-v3 together with gwt-maven-plugin. Our project uses Requestfactory extensively, so I created a project using modular-requestfactory archetype.

Using maven commands I could successfully run the sample app, but I could not get the app to run within eclipse using the following GWT Eclipse Plugin V3 - GWT Development Mode with Tomcat - Manually Configure as a guide.

This is the error I get :

Aug 02, 2017 5:11:15 PM com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
SEVERE: Unexpected error
java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the net.access.gwtmain.AppFactory RequestFactory type
at com.google.web.bindery.requestfactory.vm.impl.Deobfuscator$Builder.load(Deobfuscator.java:58)
at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.updateDeobfuscator(ResolverServiceLayer.java:44)


I have manually added the requestfactory-apt to the compiler annotation resultig in:

SEVERE: Unexpected error
com
.google.web.bindery.requestfactory.server.UnexpectedException: No domain method descriptor is mapped to operation yc28czZ8zQtD$z0QQ8ciWx0s3p4=
 at com
.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
 at com
.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveDomainMethod(ResolverServiceLayer.java:121)
 at com
.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveDomainMethod(ServiceLayerDecorator.java:152)

 Can some direct me on how to get this to work.

Thanks in advance.

In the modular-requestfactory archetype, proxies and request contexts in 'shared' reference domain objects and services in 'server' by name (using @ProxyForName and @ServiceName), so you cannot use the annotation processor when compiling the shared interfaces, you have to do the processing in 'server', either using the ValidationTool (as done in the Maven build), or possibly calling the annotation processor on the RequestFactory interface compiled class (I don't know of any build tool, besides low-level ones like Ant, or IDE that allows this).

I don't know how to set things up in Eclipse with WTP, but you can launch and debug the server code by using Run as… / Debug as… → Maven… to run the equivalent of the "mvn tomcat7:run" that you'd run from the command-line.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment