--
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-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/e2a0a891-04e1-4bd8-9e7f-8047fab9ea8en%40googlegroups.com.
--
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-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/990885cc-98e1-4f5f-a159-ca0c1b080f32n%40googlegroups.com.
Hi all
I am trying to set my GWT development environment up such that I deploy to a local Tomcat (v8.5 in my case) from my IDE (Eclipse and IntelliJ – I am setting this up for an entire team) and then start CodeServer to supply the JS code, the code maps and what not.
I managed to get things starting up, the application gets deployed to Tomcat from the IDE and then I manually start the code server via mvn gtw:codeServer in a command window. Note: I am NOT using any GWT plugin, neither Eclipse’s nor IntelliJ’s. Maybe I will give them another try later, but in my last installation neither worked.
I can then connect to the WebPage, I get the login-form and the initial webpage and the code-server starts compiling the JS-code. So far so good.
However, then the compilation in the code server always fails due to some missing source files. I analyzed the errors and there indeed bugs in our code. Earlier developers added code that should be server-side only into shared DTO classes ☹. I will need to re-arrange and fix that but I don’t have the time right now.
The offending methods are never used on the client side and thus apparently they are ignored and do no harm. Amazingly the GWT compiler – when compiling the application for the version that gets packed up as war file – ignores those issues and continues with the compilation and the deployed application then runs just fine.
But when the very same application is compiled in code-server the compilation fails:
…
[INFO] Compiling module ch.zh.ksta.zhstregisterjp.ZHStRegisterJPWeb
[INFO] Ignored 8 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] [ERROR] Errors in 'file:/D:/Projects/KStA_ZH_RegisterJP/code/application/zhstregisterjp-common/src/main/java/ch/zh/ksta/zhstregisterjp/shared/security/SecurityUtils.java'
[INFO] [ERROR] Line 36: No source code is available for type org.springframework.security.core.context.SecurityContextHolder; did you forget to inherit a required module?
…
[INFO] [ERROR] Compiler returned false
[INFO] [WARN] recompile failed
[INFO] [WARN] continuing to serve previous version
Since there *is no* previous version that’s it and the application then hangs/crashes.
It almost seems as if code server compiles in strict mode here, even though I explicitly have specified <failOnError>false</failOnError> in the plugin config.
Can one somehow “fix” (or rather circumvent) this behavior?
I need to be able to run and debug this application soon and have to postpone the cleanup to later. Is there a way to get the code server ignoring those errors and continue compiling that code – as the GWT-compiler apparently does when generating the code for the .war file?
Regards,
Michael
I boiled the cases where the compilation triggered in the code server stalls (see my previous email) down to three errors (the other dozen or so I was able to fix), but what do these last error messages try to convey to me?
[INFO] [ERROR] Line 193: Rebind result 'ch.zh.ksta.zhstregisterjp.client.ui.components.ZHStRegisterJPThreeListField.ZHStRegisterJPThreeListFieldAppearance' must be a class
[INFO] [ERROR] Line 141: Rebind result 'com.sencha.gxt.data.shared.LabelProvider' must be a class
What is this «rebinding» about? Is there some explanation somewhere? And why does it fail here? Esp. the latter error bothers me since that is in some library we use and I can’t change that.
And the third one:
[INFO] [ERROR] Line 85: Only string constants may be used as property name in System.getProperty()
The code causing the above is from a spring library:
public static boolean getBoolean(final String name) {
boolean result = false;
try {
result = Boolean.parseBoolean(System.getProperty(name));
} catch (IllegalArgumentException | NullPointerException e) {
}
return result;
}
Does that REALLY mean that GWT can’t handle a System.getProperty(…)-calls with an argument that’s passed into the method? That seems completely brain-damaged to me. Why is that so???
--
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-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/00fe01d93d50%24a9751180%24fc5f3480%24%40gmail.com.
(4) Treat the client as a JavaScript app
It is helpful for Java developers to think of the client as a JavaScript web application, since the result of the transpilation process is JavaScript that runs on a web browser. This makes it easier to understand how to include the JavaScript files in the static directory of your Spring Boot web application.