Shibboleth 5.1.4 Uncaught java.lang.NullPointerException

Orlandis Brown brownolb1 at gmail.com
Fri Aug 15 17:43:57 UTC 2025


 Hi,

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.

After the MySQL server was brought down, the following runtime exception
would occur at login and would be reported to the user:

14:16:01:893  ERROR [24.237.69.39] net.shibboleth.idp.saml.profile:35 >
 Uncaught runtime exception
java.lang.NullPointerException: Cannot invoke
"com.mysql.cj.NativeSession.getCancelTimer()" because "this.session" is null
        at com.mysql.cj.AbstractQuery.stopQueryTimer(AbstractQuery.java:228)

This exception was reported over a period of 45 minutes. Since it is
completely uncaught, the failover data connector was not invoked.

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.

Please see our configuration for this data connector below:

*global.xml*

    <bean id="BADGES_RDB_CONNECTOR"
class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"
            p:driverClassName="com.mysql.jdbc.Driver"
            p:url="%{idp.badgesrdb.url}"
            p:username="%{idp.badgesrdb.username}"
            p:password="%{idp.badgesrdb.password}" />

*attribute-resolver.xml*

<DataConnector id="BADGES_RDB" xsi:type="RelationalDatabase">
        <InputAttributeDefinition ref="UAID"/>
        <BeanManagedConnection>BADGES_RDB_CONNECTOR</BeanManagedConnection>
        <FailoverDataConnector ref="BADGES_RDB_FAILOVER" />
        <QueryTemplate>
        <![CDATA[
                CALL BADGESTEST.get_unmet_auth_requirements('$UAID.get(0)',
'$resolutionContext.getAttributeRecipientID()')
        ]]>
        </QueryTemplate>
        <Column columnName="soft_requirements"
attributeID="soft_requirements" />
        <Column columnName="hard_requirements"
attributeID="hard_requirements" />
</DataConnector>

<DataConnector id="BADGES_RDB_FAILOVER" xsi:type="Static">
        <Attribute id="soft_requirements">
                <Value>none</Value>
        </Attribute>
        <Attribute id="hard_requirements">
                <Value>none</Value>
        </Attribute>
</DataConnector>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20250815/c8edd1a1/attachment.htm>


More information about the users mailing list