SQL Authentication is enabled on SQL Server yet Appian SQL Authentication fails. This can be seen in the application server log with a large stack trace, but it will contain the following important statements:
java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for jdbc/<DataSource> ... Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for jdbc/<DataSource> ... Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null ... Caused by: javax.resource.ResourceException: Could not create connection
There are three possible causes for this issue:
<JBOSS_HOME>\modules\com\microsoft\sqlserver\jdbc\main
For Cause 1, update the module.xml to use the correct syntax for SQL Server and the correct path for the driver. Steps on how to configure module.xml can be found in Configuring Relational Databases.
For Cause 2, perform the following:
java.library.path
<JBOSS_HOME>\bin
<JBOSS-HOME>
set CUSTOM_JAVA_OPTS=-Djava.library.path="<JBOSS-HOME>/modules/com/microsoft/sqlserver/jdbc/main"
Note: Use forward slashes (/) in the above command only.
Note: If using JBoss as a Windows Service, run it as the Windows user used to log in. Also, uninstall and reinstall the JBoss Windows Service for changes to take effect.
For Cause 3, enable SQL Server Browser in SQL Server Configuration Manager under SQL Server Services to allow the named instance to resolve to a hostname and port. Do not include the port in the connection URL if <HOSTNAME>/<NAMEDINSTANCE> is used.
<HOSTNAME>/<NAMEDINSTANCE>
If desired, integrated authentication can be turned off. This workaround should not be used for users that want to configure integrated security with SQL Server. Make the following changes in the appian-ds.xml file for this datasource to switch to SQL Server Authentication.
For a URL based connection string, add ;integratedSecurity=false (including the semicolon) at the end of the URL after the databasename property. The connection string should now look like this:
databasename
<xa-datasource-property name="URL">jdbc:sqlserver://sqlserver.example.com:1433;databaseName=MsSqlForAppian;integratedSecurity=false</xa-datasource-property>
For <xa-datasource-property> tag-based connection parameters, set the IntegratedSecurity property to false, so contents of the <xa-datasource>should now look like this:
<xa-datasource-property>
IntegratedSecurity
<xa-datasource>
<xa-datasource-property name="ServerName">sqlserver.example.com</xa-datasource-property> <xa-datasource-property name="PortNumber">1433</xa-datasource-property> <xa-datasource-property name="DatabaseName">MsSqlForAppian</xa-datasource-property> <xa-datasource-property name="IntegratedSecurity">false</xa-datasource-property>
This article applies to all versions of Appian using SQL Server as a data source and using an application server on a Windows-based operating system.
Last Reviewed: February 2017