Why?
As Christian Kuetbach said, this is the difference between running in DevMode (where your code executes in Java) and prod mode (where your code has been compiled to JavaScript and optimized, which includes renaming classes and methods).
How do you fix this?
You don't. Generally speaking, showing stack traces to your users is not a good idea. Much better is to log the exception by sending it to the server (e.g. use java.util.logging
to log, along with the SimpleRemoteLogHandler
to send the log to the server, where it'll be logged using java.util.logging
).
There are ways to deobfuscate the stack trace though, and the RemoteLoggingServiceImpl
servlet can be configured to do it automatically.
See http://code.google.com/p/google-web-toolkit/wiki/WebModeExceptions for the gory details.
If you can't or don't want to use remote logging, then you can "manually" deobfuscate the stack trace: look at the file in WEB-INF/deploy
(default location, can be changed by passing -deploy
to the GWT compiler) corresponding with the permutation (same name as the *.cache.*
file loaded by the browser), it'll tell you which Java method the Le
method originates from.
But you already have the source file name and line number, so you don't really need it, right?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…