GWT
,我已经将我的服务器部署到 Tomcat 上。这个工作正常,但当 GWT
抛出异常时,一个弹出窗口会显示客户端异常的堆栈跟踪。在开发模式下,这个功能正常。但在 Tomcat 中,我得到了下面的堆栈跟踪。
为什么会出现这种情况?如何解决?
Unknown.Le(StackTraceCreator.java:168)
Unknown.Jd(StackTraceCreator.java:421)
Unknown.NT(Exception_FieldSerializer.java:16)
Unknown.g1(SerializerBase.java:55)
Unknown.b1(SerializerBase.java:112)
Unknown.D$(AbstractSerializationStreamReader.java:119)
Unknown.uAc(CustomException_FieldSerializer.java:39)
Unknown.uBc(ServerSideException_FieldSerializer.java:12)
Unknown.f1(SerializerBase.java:46)
Unknown._0(SerializerBase.java:92)
Unknown.D$(AbstractSerializationStreamReader.java:119)
Unknown.B_(RequestCallbackAdapter.java:216)
Unknown._o(Request.java:287)
使用@Christian Kuetbach的答案后,我现在得到的是:
Unknown.com_google_gwt_core_client_impl_StackTraceCreator$CollectorEmulated_$fillInStackTrace__Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorEmulated_2Ljava_lang_Throwable_2V(StackTraceCreator.java:168) Unknown.java_lang_Throwable_Throwable__Ljava_lang_String_2Ljava_lang_Throwable_2V(StackTraceCreator.java:421) Unknown.com_google_gwt_user_client_rpc_StatusCodeException_StatusCodeException__ILjava_lang_String_2V(StatusCodeException.java:35) Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(RequestCallbackAdapter.java:209) Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Request.java:287) Unknown.com_google_gwt_http_client_RequestBuilder $1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(RequestBuilder.java:395)Unknown.anonymous(XMLHttpRequest.java:287)
请帮忙!
new File("/path/to/myExtraDir")
,请参见StackTraceDeobfuscator.setSymbolMapsDirectory(String symbolMapsDirectory)
,因此您可以使用任何与通常的java.io.File(String)
构造函数兼容的内容(例如,如果在 Unix 上以正斜杠开头,则是绝对路径,...)。 - Chris Lercher