Project

General

Profile

Actions

Task #480

closed

Show whole stacktrace in role request log

Added by Radek Tomiška almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Vít Švanda
Category:
Logging
Target version:
Start date:
06/02/2017
Due date:
% Done:

100%

Estimated time:
Owner:

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).

Actions #1

Updated by Vít Švanda almost 7 years ago

  • Target version changed from Citrine (7.3.0) to Diamond (7.4.0)
Actions #2

Updated by Vít Švanda almost 7 years ago

  • Priority changed from Normal to High
Actions #3

Updated by Vít Švanda over 6 years ago

  • Target version deleted (Diamond (7.4.0))
Actions #4

Updated by Vít Švanda over 6 years ago

  • Target version set to Emerald (7.5.0)
Actions #5

Updated by Radek Tomiška over 6 years ago

  • Target version deleted (Emerald (7.5.0))
Actions #6

Updated by Vít Švanda over 6 years ago

  • Status changed from New to In Progress
  • Target version set to Forsterite (7.6.0)
Actions #7

Updated by Vít Švanda over 6 years ago

  • % 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.

Actions #8

Updated by Vít Švanda over 6 years ago

  • 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?

Actions #10

Updated by Radek Tomiška over 6 years ago

  • 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.

Actions

Also available in: Atom PDF