<div dir="ltr">
<div dir="ltr"><div>Hi,</div><div><br></div><div>We encountered an uncaught exception error resulting from the MySQL JDBC driver 
(v. 8.1.0) mishandling a dropped connection to the MySQL 
server. The MySQL server is configured as an attribute data connector in IdP 5.1.4 and was temporarily brought down for maintenance, triggering the error until it was brought back online.</div><div><br></div><div>After the MySQL server was brought down, the following runtime exception would occur at login and would be reported to the user:</div><div><br></div><div><span style="font-family:monospace">14:16:01:893  ERROR [24.237.69.39] net.shibboleth.idp.saml.profile:35 >  Uncaught runtime exception<br>java.lang.NullPointerException: Cannot invoke "com.mysql.cj.NativeSession.getCancelTimer()" because "this.session" is null<br>        at com.mysql.cj.AbstractQuery.stopQueryTimer(AbstractQuery.java:228)</span></div><div><br></div><div>This
 exception was reported over a period of 45 minutes. Since it is 
completely uncaught, the failover data connector was not invoked.</div><div><br></div><div>As you
 can see, the driver continues to use the database session after it is made null- We are wondering if this should be reported as a bug with the driver (assuming it is present in the most recent release), or if there is some way to handle this error within the IdP to trigger the failover data connector.</div><div><br></div><div>Please see our configuration for this data connector below:</div><div><br></div><div><i style="font-family:monospace">global.xml</i></div><div><span style="font-family:monospace"><i><br></i></span></div><div><span style="font-family:monospace">    <bean id="BADGES_RDB_CONNECTOR" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"<br>            p:driverClassName="com.mysql.jdbc.Driver"<br>            p:url="%{idp.badgesrdb.url}"<br>            p:username="%{idp.badgesrdb.username}"<br>            p:password="%{idp.badgesrdb.password}" /></span></div><div><span style="font-family:monospace"><br></span></div><div><i style="font-family:monospace">attribute-resolver.xml</i></div><div><span style="font-family:monospace"><i><br></i></span></div><div><span style="font-family:monospace"><DataConnector id="BADGES_RDB" xsi:type="RelationalDatabase"><br>        <InputAttributeDefinition ref="UAID"/><br>        <BeanManagedConnection>BADGES_RDB_CONNECTOR</BeanManagedConnection><br>        <FailoverDataConnector ref="BADGES_RDB_FAILOVER" /><br>        <QueryTemplate><br>        <![CDATA[<br>                CALL BADGESTEST.get_unmet_auth_requirements('$UAID.get(0)', '$resolutionContext.getAttributeRecipientID()')<br>        ]]><br>        </QueryTemplate><br>        <Column columnName="soft_requirements" attributeID="soft_requirements" /><br>        <Column columnName="hard_requirements" attributeID="hard_requirements" /><br></DataConnector></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><DataConnector id="BADGES_RDB_FAILOVER" xsi:type="Static"><br>        <Attribute id="soft_requirements"><br>                <Value>none</Value><br>        </Attribute><br>        <Attribute id="hard_requirements"><br>                <Value>none</Value><br>        </Attribute><br></DataConnector></span></div></div>

<br></div>