Skip to content

ClassCastException on SpringTransactionInteceptor when RollbackException occurs #3712

Closed
@tasso94

Description

Environment (Required on creation)

7.20 Spring

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

ClassCastException on SpringTransactionInteceptor when RollbackException occurs.

Steps to reproduce (Required on creation)

Use the spring-core module and provoke an exception that is not a SQLException (e.g., a RollbackException).

Observed Behavior (Required on creation)

ClassCastException is thrown.

Expected behavior (Required on creation)

The RollbackException (or any other exception) is propagated to the API call and can be handled by the user accordingly.

Root Cause (Required on prioritization)

Premature cast to SQLException.

Solution Ideas

Only perform the cast after checking the type of the exception.

Hints

Links

Breakdown

Pull Requests

Preview Give feedback
  1. tasso94

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions