我正在使用GWT-RPC來調用ANTLR語法。 如果語法失敗,我創建一個包含語法拋出的錯誤/異常的對象,並將其返回給客戶端。序列化GWT RPC的ANTLR異常
當我做到這一點我得到異常:
com.google.gwt.user.client.rpc.SerializationException: Type 'org.antlr.runtime.NoViableAltException' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded.
我發現有一個與另外一個公共的無參數的構造函數(需要GWT-RPC序列化)的相同類的COM .google.appengine.repackaged.org.antlr.runtime包。
如何轉換org.antlr.runtime.NoViableAltException成com.google.appengine.repackaged.org.antlr.runtime.NoViableAltException?