Thursday, January 16, 2014

ADF Exception Handling - Taskflow, Controller, Model

Exception handling in ADF can be done at following three places:
a. Taskflow Exception Handler
b. Extending Controller level ExceptionHandler - for controller level exceptions
c. Extending DCErrorHandlerImpl- for model

  • Whenever there is an exception in model layer it is being handled by custom class extending DCErrorHandlerImpl.
  • Exception in ADF Controller can be handled by creating a custom class extending Controller level ExceptionHandler.
  • If an exception rethrown from above, it can be handled at TaskFlow level exception handler which can be a view activity, router or a method call.
One by one let`s discuss all of them:

Sunday, January 5, 2014

ADF integration with Jasper Report

In this post i am just posting a few important steps and code snippet which can be helpful to integrate with Jasper Reports for generating a pdf or an excel.

You need add the following jars from /modules/ext folder of Jasper Reports in your ADF project(fonts related jar need to be added if you are using some specific fonts in your jrxml):

Make sure to add above jars from Add Jar/Directory and not through Add Library, otherwise you will get the following error:
<ActionListenerImpl> <processAction> java.lang.ClassCircularityError: net/sf/jasperreports/engine/JRException
javax.faces.el.EvaluationException: java.lang.ClassCircularityError: net/sf/jasperreports/engine/JRException