How to run the GWT RequestFactory Validation Tool in an Eclipse project

I have an Android AppEngine Connected Project that I am trying to build using GWT2.4 RequestFactory and Objectify on my Eclipse IDE.

Apparently, I need to run the RequestFactory Validator because I use the ServiceName and ProxyForName annotations (this is especially important when working with the Android client side). My problem is that Eclipse cannot check it, and the solution provided at http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation#IDE_configuration is enough to make me break my eyes.

Since I work on a machine under Windows, the shell script is not very useful. Trying to run the verification tool using the cmd command, an error message appears: "This tool should be launched using the JDK, not the JRE"

Can someone explain how this tool should be run? Is there a way to use it as an external tool in eclipse?

+4
source share
5 answers

Usually, if you carefully follow the instructions in the displayed link and start the GWT development mode from Eclipse, the check should be performed automatically when you access the development URL with your browser.

For the record, I actually had some problems with this, but running the application several times helped it to work.

0
source

Well, I ran into the same problem. When I tried to process the annotation (under Java Compiler -> Processing Annotations), it was disabled. Thus, RequestFactoryDeobfuscatorBuilder is not generated. Try turning this on and rebuilding your project.

0
source

I just recovered from two days of hunting for this error in the project, which was used for proper verification, but stopped.

In my case, I had a new base BaseRequestContext and a specific sub-interface that extended it. My parent interface declared a method that didn’t exactly match the locator (for example, getThing (T) vs get (T)), and this was not reported as an error, but did not complete the shutdown of the validation tool.

0
source

Apt is also removed in Java 8: http://openjdk.java.net/jeps/117 . So be careful.

Switching to Java 7 will fix the problem if you are using Java 8.

0
source

I understood why an error sometimes occurs in a project: the compiler complained that it could not find the .apt directory. But when I tried to create it manually, it was impossible (under the windows). I think the validation tool disables the exception due to the inability to create a directory: try renaming .apt to your validation tool calls (do a text search in your project)

-one
source

Source: https://habr.com/ru/post/1396309/


All Articles