Bug 1612123 - [GSS](6.4.z) MySQLValidConnectionChecker swallow a root cause of the exception
Summary: [GSS](6.4.z) MySQLValidConnectionChecker swallow a root cause of the exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.4.20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.21
Assignee: jboss-set
QA Contact: Peter Mackay
URL:
Whiteboard:
Depends On:
Blocks: eap6421-payload 1611770
TreeView+ depends on / blocked
 
Reported: 2018-08-03 14:06 UTC by Brad Maxwell
Modified: 2021-06-10 16:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:46:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-14506 0 Major Closed [GSS](7.1.z) MySQLValidConnectionChecker swallow a root cause of the exception 2019-03-07 14:59:13 UTC
Red Hat Issue Tracker JBJCA-1373 0 Major Resolved MySQLValidConnectionChecker swallow a root cause of the exception 2019-03-07 14:59:12 UTC

Description Brad Maxwell 2018-08-03 14:06:22 UTC
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@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.


Note You need to log in before you can comment on or make changes to this bug.