-
1. Re: Reproducible "White screen of death"
jfuerth May 10, 2013 5:06 PM (in response to mdhirsch30345)Hi Michael,
I feel your frustration. There's nothing worse than a failure without any explanation.
When this happens, I bet you get a message like this in the dev mode console:
00:06:21.435 [INFO] Ignored 1 unit with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
This is what GWT does by default when it encounters non-translatable code. From Errai's point of view, these "ignored compilation units" simply don't exist. We can't see them at all in GWT's TypeOracle. Unfortunately, this means we can't have Errai emit an error message, because we don't know what we're missing.
Often, compiling with -strict is enough. But not always. Sometimes you need to set the logLevel to DEBUG to see the error. Unfortunately, there is a lot of noise to deal with when the log level is set so low. You're looking for one or more messages like this:
00:01:55.705 [TRACE] Errors in 'org/jboss/errai/jpa/sync/client/local/ClientSyncManager.java' 00:01:55.705 [TRACE] Line 135: The method getSimpleName() is undefined for the type Class<capture#4-of ? extends SyncResponse>
The key phrase to look for is "Errors in" .. and the actual compiler errors from GWT's embedded JDT will be beneath that node.
Hope that helps!
Jonathan
-
2. Re: Reproducible "White screen of death"
mdhirsch30345 May 10, 2013 6:45 PM (in response to jfuerth)Thanks Jonathan. That did catch this particular error.
We only just upgraded to 2.3.0 and I forgot to turn on strict. It didn't seem to work with 2.1.0.
I'll put that in our build immediately.
Is there a way to make dev-mode complain? Does dev-mode have a "-strict"?
Thanks,
Michael
-
3. Re: Reproducible "White screen of death"
jfuerth May 13, 2013 9:40 AM (in response to mdhirsch30345)Hi Michael,
It appears you can't set Dev Mode for strict compiles. Not sure why, but it doesn't seem to be a documented option:
Google Web Toolkit 2.5.1
DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s]
where
-noserver Prevents the embedded web server from running
-port Specifies the TCP port for the embedded web server (defaults to 8888)
-whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
-blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
-logdir Logs to a file in the given directory, as well as graphically
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-gen Debugging: causes normally-transient generated types to be saved in the specified directory
-bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
-codeServerPort Specifies the TCP port for the code server (defaults to 9997)
-server Specify a different embedded web server to run (must implement ServletContainerLauncher)
-startupUrl Automatically launches the specified URL
-war The directory into which deployable output files will be written (defaults to 'war')
-deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
-extra The directory into which extra files, not intended for deployment, will be written
-workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
and
module[s] Specifies the name(s) of the module(s) to host
-Jonathan