Struggling to get a SQL DataConnector working

Craig Betts Craig.Betts at nottingham.ac.uk
Thu Jun 2 07:49:29 EDT 2016


Hi All,

I'm hoping someone can help point me in the right direction as I'm struggling to get a SQL DataConnector working. I've not done anything like this before so I may be making an obvious mistake.

This is a new IDP v3.2 running on Windows 2012.

My configuration in attribute resolver is as follows;

********************************************

<resolver:DataConnector id="sqlLegend" xsi:type="dc:RelationalDatabase" xmlns="urn:mace:shibboleth:2.0:resolver:dc">
       
		<dc:ApplicationManagedConnection 
			jdbcDriver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           			 jdbcURL="jdbc:sqlserver://MyDBAlias:1433;DatabaseName=MyDBName"
			jdbcUserName="MyUserName" 
			jdbcPassword="MySecretPassword" />
        <dc:QueryTemplate>
            <![CDATA[
                SELECT *
				FROM dbo.Staging
				WHERE username = '${requestContext.principalName}'
            ]]>
        </dc:QueryTemplate>

    </resolver:DataConnector>

***********************************************

The errors I am seeing in idp-process.log are as follows;

*****************************************************

2016-06-02 10:52:16,824 - ERROR [net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.DataSourceValidator:100] - Datasource validation failed
java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
Caused by: java.lang.InterruptedException: null
	at java.lang.Object.wait(Native Method)
2016-06-02 10:52:16,824 - ERROR [net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.RDBMSDataConnector:137] - Data Connector 'sqlLegend': Invalid connector configuration
net.shibboleth.idp.attribute.resolver.dc.ValidationException: Invalid connector configuration
	at net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.DataSourceValidator.validate(DataSourceValidator.java:103)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
Caused by: java.lang.InterruptedException: null
	at java.lang.Object.wait(Native Method)
2016-06-02 10:52:16,840 - WARN [net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext:545] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlLegend': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.component.ComponentInitializationException: Data Connector 'sqlLegend': Invalid connector configuration
2016-06-02 10:52:16,840 - ERROR [net.shibboleth.utilities.java.support.service.AbstractReloadableService:181] - Service 'shibboleth.AttributeResolverService': Initial load failed
net.shibboleth.utilities.java.support.service.ServiceException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlLegend': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.component.ComponentInitializationException: Data Connector 'sqlLegend': Invalid connector configuration
	at net.shibboleth.ext.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:334)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlLegend': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.component.ComponentInitializationException: Data Connector 'sqlLegend': Invalid connector configuration
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
Caused by: net.shibboleth.utilities.java.support.component.ComponentInitializationException: Data Connector 'sqlLegend': Invalid connector configuration
	at net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.RDBMSDataConnector.doInitialize(RDBMSDataConnector.java:138)
Caused by: net.shibboleth.idp.attribute.resolver.dc.ValidationException: Invalid connector configuration
	at net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.DataSourceValidator.validate(DataSourceValidator.java:103)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
Caused by: java.lang.InterruptedException: null
	at java.lang.Object.wait(Native Method)


Can anyone see where I am going wrong? Have I missed something on the connector configuration or is this a red herring? 

Thanks 

Craig Betts
Information Services 
The University of Nottingham
 





This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.



More information about the users mailing list