flex blazes spring 异常翻译器
我正在使用 spring 异常翻译器将 java 异常包装到 flex 异常中。
public void testException()throws Exception{
throw new Exception("my exception");
}
但由于某种原因,我收到了 IllegalAccessError
。代码部分正在进入 testException 和 Translator 类。
问题:
为什么它试图获取日志目标级别?有人可以帮我解决这个问题吗?
以下是日志中的行:
MyExceptionTranslatorImpl.translate() class java.lang.IllegalAccessError MyExceptionTranslatorImpl.translate() java.lang.IllegalAccessError: tried to access method **flex.messaging.log.Log.getTargetLevel()S** from class flex.messaging.MessageException MyExceptionTranslatorImpl.translate() tried to access method flex.messaging.log.Log.getTargetLevel()S from class flex.messaging.MessageException [BlazeDS] tried to access method flex.messaging.log.Log.getTargetLevel()S from class flex.messaging.MessageException [BlazeDS] Serializing AMF/HTTP response
I am using spring exception translator to wrap java exception into flex exception.
public void testException()throws Exception{
throw new Exception("my exception");
}
But for some reason, I am getting IllegalAccessError
. The code sections are entering the testException and the Translator class.
Question:
Why it trying to get log target level? Can someone help me resolve this please.
Below is the lines from the log:
MyExceptionTranslatorImpl.translate() class java.lang.IllegalAccessError MyExceptionTranslatorImpl.translate() java.lang.IllegalAccessError: tried to access method **flex.messaging.log.Log.getTargetLevel()S** from class flex.messaging.MessageException MyExceptionTranslatorImpl.translate() tried to access method flex.messaging.log.Log.getTargetLevel()S from class flex.messaging.MessageException [BlazeDS] tried to access method flex.messaging.log.Log.getTargetLevel()S from class flex.messaging.MessageException [BlazeDS] Serializing AMF/HTTP response
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,这在罐子里是不匹配的。感谢 Cornel Creanga 的初步回复。
我还验证了抛出 java.lang.exception 足以捕获客户端的错误。
This turned out to be mismatch in jars. Thank you Cornel Creanga for the initial response.
I also verified that throwing an java.lang.exception was enough to catch the error on the client side.