0
votes

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
1
Sounds as a mismatch between jars. Can you please post the full stack trace and the blazeds/spring version? - Cornel Creanga
Your are probably right, Sorry for the delay in replying. Unfortunately our jars are stripped of their version info. So, I tried a fresh download and a sample project. The code works. I will further try to narrow down the jars. Thanks for the help. - Shah Al

1 Answers

0
votes

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.