You need to think that the result app will be running in browser as JavaScript.
Can you do System.getProperty(...) in web browser? In my last article I emphasize this: *(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. https://bit.ly/DynamiteDuo And also don't mix the server and client module. It seems you add SpringFramework together with your client module... In my article above I write about the separation... Hope this helps. Michael Moser schrieb am Freitag, 10. Februar 2023 um 17:15:25 UTC+1: > 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??? > > > > > > > > *From:* [email protected] <[email protected]> *On > Behalf Of *Michael Moser > *Sent:* Friday, February 10, 2023 2:08 PM > *To:* [email protected] > *Subject:* Can one convince code server to continue with compilation even > if certain source files are missing? > > > > 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 > > > > > > -- > > 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 [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-web-toolkit/00fe01d93d50%24a9751180%24fc5f3480%24%40gmail.com > > <https://groups.google.com/d/msgid/google-web-toolkit/00fe01d93d50%24a9751180%24fc5f3480%24%40gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/d2a094fc-09ee-44dd-abf5-ae8d90f4d95cn%40googlegroups.com.
