I have a strange problem with Async methods. If I run it asynchronously and its job throws a specific exception, it does not display it and just stops execution (no catch, no log).
I found that it works with jasperreport. This is the fault code:
JasperPrint jp1=null; try{ jp1 = JasperFillManager.fillReport(reportD1, params, new JRBeanCollectionDataSource(ingressi)); }catch(Exception e){ log.error(e); e.printStackTrace(); throw e; }
If this code is inside the annotated Async method, it does not throw an exception and does not register (it just stops execution). If I delete the Async annotation, it produces the following:
java.lang.ClassNotFoundException: org.apache.commons.collections.map.ReferenceMap
My problem is not the exception itself, but why does the async method not catch it?
source share