springapache-flexexceptionblazeds

flex blazeds spring exception translator


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

Solution

  • 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.