[jboss-jira] [JBoss JIRA] (JBJCA-1373) MySQLValidConnectionChecker swallow a root cause of the exception
Lin Gao (JIRA)
issues at jboss.org
Tue Apr 10 03:10:01 EDT 2018
[ https://issues.jboss.org/browse/JBJCA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lin Gao moved JBEAP-14563 to JBJCA-1373:
----------------------------------------
Project: IronJacamar (was: JBoss Enterprise Application Platform)
Key: JBJCA-1373 (was: JBEAP-14563)
Workflow: classic default workflow (was: CDW with loose statuses v1)
Component/s: JDBC
(was: JCA)
Affects Version/s: (was: 7.1.0.GA)
Fix Version/s: (was: 7.1.3.GA)
> MySQLValidConnectionChecker swallow a root cause of the exception
> -----------------------------------------------------------------
>
> Key: JBJCA-1373
> URL: https://issues.jboss.org/browse/JBJCA-1373
> Project: IronJacamar
> Issue Type: Bug
> Components: JDBC
> Reporter: Lin Gao
> Assignee: Petr Jurak
>
> When java.sql.SQLException is thrown, the root cause should be logged at the same time by MySQLValidConnectionChecker validation.
> ~~~
> WARN [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (default task-1) IJ030027: Destroying connection that is not valid, due to the following exception: com.mysql.jdbc.JDBC4Connection at 5d0ae267: java.sql.SQLException: Ping failed: java.lang.reflect.InvocationTargetException
> at org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker.isValidConnection(MySQLValidConnectionChecker.java:93)
> at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1272)
> at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getInvalidConnections(BaseWrapperManagedConnectionFactory.java:1085)
> ~~~
> However, the current code is :
> return new SQLException("Ping failed: " + e.toString());
> so this should be modified by:
> return new SQLException("Ping failed: " + e.toString(), e);
> and logged message with root cause.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list