Skip to main content

Globally configuring ErrorHandlerClass for an ADF application

I talked about customizing the DCErrorHandlerImpl in one of my old blog post This custom ErrorHandlerClass is usually configured in DataBindings.cpx file. What if you have many projects and you want to configure it centrally in one place at application level. From release version onward ADF supports configuration of ErrorHandlerClass  in adf-config.xml (Thanks to Steve Muench who shared this tip). A sample adf-config.xml with custom error handler class is here:

<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="" xmlns:config=""
  <adf-adfm-config xmlns="">
    <defaults changeEventPolicy="ppr" useBindVarsForViewCriteriaLiterals="true"/>
    <startup errorHandlerClass="view.util.CustomDCErrorHandlerImpl">
        <config:Database jbo.locking.mode="optimistic"/>
  ... ... ...


Renan Barbalho said…
First congratulations for your post, it's very nice!
I've a ADF Mobile application and I want define a global exception handler but I don't know how!
I tried to configure like your article but when an exception is generated the exception handler class didn't invoke.
Do you have any idea to solve this question?

Renan Barbalho said…
Can you post your class view.util.CustomDCErrorHandlerImpl?
See this link
btw, this for ADF Web
Renan Barbalho said…
Dear Jobinesh,
And Global Error Handler to ADF Mobile, do you know how to do this?

I need to put this in my application. I have a big application based on the adf mobile.
I work with oracle spatial, mapviewer, oraclemaps, adf web, adf desktop. My company has projects that use oracle technology and we're Oracle's Partner.
If you can help me I'll be very happy. If necessary I can to pass my project by email for you.


Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!