[NotABug] JBOException in method activity not displayed in exception handler

person Bijeshfolder_openOtheraccess_time October 5, 2012

See my post here – https://forums.oracle.com/forums/message.jspa?messageID=10474315

There is a change in behaviour between and wrt exceptions in method activity. When a method activity is bound to a ADF BC method and an exception occurs, the error message is no longer displayed as a Faces message. I did raise this as an SR with Oracle but have since switched jobs and don’t have access to the SR.

Anyway, Frank Nimphius posted back on the forum with the response to the bug. Essentially, this was a bug fix in so this is as expected. To render JBO exceptions as a Faces message, you will now need to create a custom exception handler. The sample code from the bug is below

ControllerContext context = ControllerContext.getInstance();
ViewPortContext currentRootViewPort = context.getCurrentViewPort();
Exception ex = currentRootViewPort.getExceptionData();
FacesContext fc = FacesContext.getCurrentInstance();
FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,
"ADFc Exception Handler: " + ex.getMessage(), null);
fc.addMessage(null, facesMessage);

There you go.


  1. Hi Bijesh,

    Will this code handle all JBOException and

    where to use this code?

    should we have to catch all exception and then use this?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>