我有下面这段代码:如何捕捉调用目标异常?
try
{
glogger.debug("Calling getReportData (BudgetInBriefDAO)");
lHashData = objBudgetInBriefDAO.getReportData(lStrFinYrId, lStrLangId, lStrContextPath, lStrFinYrDesc);
glogger.debug("Returning from getReportData (BudgetInBriefDAO)");
}
// catch(InvocationTargetException ie)
// {
// glogger.error("InvocationTargetException !!!");
// glogger.error("InvocationTargetException in calling BudgetInBriefBean -> getReportData");
// glogger.error("Target Exception is : " + ie.getTargetException());
// glogger.error("Cause is : " + ie.getCause());
// ie.printStackTrace();
// }
catch(Exception e)
{
glogger.error("Exception !!!");
glogger.error("Error in calling BudgetInBriefBean -> getReportData. Error is :- " + e);
e.printStackTrace();
}
我收到以下错误:
FATAL : AJPRequestHandler-ApplicationServerThread-25 com.tcs.sgv.common.util.GenericEJBObject - InvocationTargetException :java.lang.reflect.InvocationTargetException - 14 Feb 2012 12:36:00,155 - 5210474 milliseconds
它不是打印堆栈跟踪。我怎么知道异常的原因?
我已取消注释代码&仍未打印堆栈跟踪。
之间,我的BudgetInBriefDAO实现(BudgetInBriefDAOImpl)包含4个类。
BudgetInBriefDAOImpl & 3 other Thread classes
我已成功反编译所有类文件没有损坏。
请帮忙找出异常的实际原因。
在此先感谢。