Bob Swift SQL Pro Plugin not working with Windows Authentication Mode

Carl Lewis April 28, 2015

Hi,

We're using the application server based data source configuration to connect to a SQL Server 2008 R2 database using a jtds driver. The database is currently set to mixed mode authentication and we have been using sql server authentication (user name and password) without any issue. We now have a requirement to use Windows Authentication Mode (SSO) only to authenticate to the database. This requires the use of a dll, ntlmauth.dll which must be located somewhere in the path. We have this configured and working for Confluence, but the Bob Swift SQL Pro Plugin, which is using the same data source as Confluence (configured for Windows Authentication), no longer works. We get the following error:

 

Error rendering macro 'sql' : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)

 

We know the driver is configured correctly since Confluence itself is now authenticating using Windows Authentication. No changes have been made to the plugin configuration, it still points to the working Confluence data source. The dll is specified on the java.library.path and we've also tried putting the dll in other locations like system32 and the java bin directory. No matter where we put the dll the plugin always throws the same error, but Confluence itself authenticates successfully.

 

Does anyone have experience with getting this configuration to work?

 

Thanks,

 

Carl

2 answers

0 votes
Deleted user June 4, 2015

Hi Bob,

I work with Carl and I was able to resolve the problem.

Confluence was configured to use the default hibernate cfg.xml datasource.  We additionally configured a server.xml JNDI resource for use by the SQL plugin.

It seems like it was a timing / class loading issue as like Carl stated, Confluence would authenticate just fine.  We would only get the error once the JNDI resource was referenced by the SQL plugin on page load.

I changed the hibernate configuration to reference a new JNDI resource (separate from the one being used by the SQL plugin), and it repaired the issue.

Thanks!

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 28, 2015

I don't know. Perhaps someone else can answer. In the meantime, I created a support issue for you: SQL-369.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events