# Payara Server ignoring ExceptionMapper

**URL:** https://forum.payara.fish/t/payara-server-ignoring-exceptionmapper/532
**Category:** Payara Server
**Created:** [December 28, 2022, 11:53pm UTC](https://forum.payara.fish/t/payara-server-ignoring-exceptionmapper/532 "2022-12-28T23:53:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shimori77](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.payara.fish/shimori77/32/174_2.png) [@Shimori77](https://forum.payara.fish/u/Shimori77)
#### Post date: [December 28, 2022, 11:53pm UTC](https://forum.payara.fish/t/payara-server-ignoring-exceptionmapper/532/1 "2022-12-28T23:53:55Z")

</div>

I’m using Payara Server 6 and trying to have a duplicate key error mapped. Without success.

Errors that inherit RuntimeException are mapped properly, but for some reason org.postgresql.util.PSQLException, org.eclipse.persistence.exceptions.DatabaseException, jakarta.persistence.PersistenceException, jakarta.transaction.TransactionalException and jakarta.transaction.RollbackException cannot be handled.

Error log: [[2022-12-28T20:43:21.544-0300] [Payara 6.2022.2] [SEVERE] [] [org.glassfish.jers - Pastebin.com](https://pastebin.com/ZE14PMWD)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/payara/original/1X/71c41d89f09ea4e796afd34b097ca7cbbb00e962.png)

All ExceptionMappers are mapped using such fashion.
