Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTM masks original SQLException #60

Open
torbenriis opened this issue May 13, 2016 · 1 comment
Open

BTM masks original SQLException #60

torbenriis opened this issue May 13, 2016 · 1 comment

Comments

@torbenriis
Copy link

We have experienced that BTM masks some SQLException’s if database errors occurs.
Further investigations of the source code has shown that is only occurs in LrcXAResource, and in all occurrences, every time around auto commit handling.

Are there an explicit reason why the original cause is masked away? The cause could contain any reason from internal DB errors to lost connection.

Snippet
try {
connection.setAutoCommit(true);
} catch (SQLException ex) {
throw new BitronixXAException("cannot reset autocommit on non-XA connection", XAException.XAER_RMERR);
}

@lorban
Copy link
Contributor

lorban commented May 13, 2016

No, there is no reason: this seems to be an overlook as BitronixXAException accepts a Throwable as a 3rd argument.

You're welcome to submit a pull request with a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants