I just began learning Mulesoft and want to put together a simple demo that uses sqljdbc to hit a SQL Server database with windows authentication.
Articles I referenced:
Connecting to MS SQL Server with MuleSoft
Using Database Connector with Microsoft SQL Server
Software details:
Mule Server 3.8.4 EE
Anypoint studio 6.2.4
Problem:
If I add the location of sqljdbc_auth.dll as native library location for sqljdbc42.jar, the project will not run.
Symptoms:
When I click run project there is no console output or error. I see the loading bar in the bottom right corner for about a second and then nothing.
If I remove the dll path from the native library location, the project will run. Of course, it errors when trying to hit the database.
The database connector passes connection test when the native library path is set. It fails when it is not set.
I am assuming x64 is the correct dll to use. My pc is x64, and the database connector fails connection test when I use the x86 dll.
This behavior is consistent for any project, regardless if it has a database connector or not. The same behaviors occur for a simple "hello world" type demo.
If anyone has any suggestions I would greatly appreciate it. If I can clarify anything or help by adding more details please let me know.
I had same issue, logged ticket with Mulesoft and got a workaround.
First, you need to remove the reference to the sqljdbc_auth.dll. So remove that from the "Native library location" of the sqljjdbc42.jar.
Next, you need to add a reference to the auth DLL to the "Run configuration" for your project. To do that, do the following:
-Djava.library.path="[path to your sqljsdb_auth.dll file]" (use quotes around the path if the path contains spaces)
This worked for me, my project builds and deploys, I can debug and otherwise run it with SQL Server integrated authentication. I don't know what the implications of adding this to the Run Configuration are, but it seems to be working OK for me. If you already have things in your build path argument then you'll have to figure out how to add multiple items, I don't know how to do that though.