Task #480
closed
Show whole stacktrace in role request log
Added by Radek Tomiška over 7 years ago.
Updated about 7 years ago.
Description
When role reguest failed, only last exception is shown in log:
...
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
...
We need to prevent commit JPA transaction exception and show original cause (e.q. script exception, when role isign some schema with mapping errors).
- Target version changed from Citrine (7.3.0) to Diamond (7.4.0)
- Priority changed from Normal to High
- Target version deleted (
Diamond (7.4.0))
- Target version set to Emerald (7.5.0)
- Target version deleted (
Emerald (7.5.0))
- Status changed from New to In Progress
- Target version set to Forsterite (7.6.0)
- % Done changed from 0 to 70
I tried separate request execute to new transaction and use it only for async call.
This not worked correctly, because we need changed in request (state for example, modified in WF). This changes are only in uncommited transaction.
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 70 to 90
- I removed try and catch from "executeRequest method". In this catch was exception logged to the role request and saved. This save was source of problems.
- Known limitation/property is: When we run execute request not in new transaction (async ... approving WF process for example), then user receave the exception, but none log will be persisted to the role request. All changes will be rollback.
- I improved logging of exception (start approval). Now cause with the ResultCodeException instance is looged (in the role request) primary.
Radek, could you make a review?
- Status changed from Needs feedback to Closed
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I tested it on automatic roles, it works, thx! Code looks nice too.
Also available in: Atom
PDF