Spring Thrown JpaSystemException instead of DuplicateKeyException
问题 I'm in troubles with DataAccessException handling. When an uniquess key constraint is violated I got an JpaSystemException, and not a DuplicateKeyException! I found some thread talking about this problem, but no one help me to solve the problem. How can I map to a concrete org.springframework.dao exception? My persistence.xml file look like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001