I have created a Web Service ( running on Tomcat Server ) using one of the standard Oracle EPM Java API's for extracting HFM metadata. When there is an error within the API's it throws a HFM Exception which is a subclass of java Exception class. I would like to capture the error before it gets to the Tomcat server and be able to display the proper message from HFM. I have created a ExceptionMapper for the HFMException, but that did not capture the error. I have checked the WEB.XML to make sure that package where the ExceptionMapper has been created is in the and that looks OK.
Below is the initial HFM error: Error from Tomcat server (Eclipse)
This is the ExceptionMapper that I have created to handle the HFM Exception (I have also created one for the RegistryException)
HFMExceptionMapper Class
.
What else is needed to get the ExceptionMapper to work.
Thanks
I've rewritten the Web Service using ResourceConfig so avoiding using WEB.XML. I have created ExceptionMapper classes for the following 3rd Party Exceptions from HFM ( HFMException / RegistryException ) and also created a GeneralExceptionMapper. I have registered the classes in my ResourceConfig class and now the GeneralExceptionMapper is working but none of the more specific HFM based Excpetions.