0

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)

Screen Shot

This is the ExceptionMapper that I have created to handle the HFM Exception (I have also created one for the RegistryException)

HFMExceptionMapper Class

Screen Shot.

What else is needed to get the ExceptionMapper to work.

Thanks

Web.xml

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.

GrahamD
  • 1
  • 1
  • Where is the exception being thrown? And can you post your web.xml? – Paul Samsotha Dec 27 '18 at 17:01
  • Hi Paul - the exception is being thrown when creating an instance of the HFM Security class – GrahamD Dec 27 '18 at 18:42
  • Security security = new Security(); Following error occurs INFO: EPMREG-11070 com.hyperion.hit.registry.exceptions.RegistryException Then the following exception occurs SEVERE:EPMHFM-65536 oracle.epm.fm.common.exception.HFMException. Web XML jersey.config.server.provider.packages org.epm.hfm.HfmFileScan; org.epm.hfm.Exception jersey.config.server.provider.classnames org.epm.hfm.HfmFileScan.HFMExceptionMapper – GrahamD Dec 27 '18 at 19:02
  • is there any sample projects like this? – syam kumar c Jan 31 '23 at 11:48

0 Answers0