SQL Server connection with integrated authentication in Jaspersoft Studio

0

I have to connect Jaspersoft Studio to a SQL 2008 R2 database using the Microsoft JDBC 4.0 drivers supplied from the Microsoft website. I have downloaded the official drivers for my JDK architecture and I have added the sqljdbc4.jar and sqljdbc_auth.dll to the driver classpath page and I am able to connect using integrated Windows authentication the first time but if I click Test again or attempt to run a report I get the following error "Native Library C:\Windows\System32\sqljdbc_auth.dll already loaded in another classloader".

Note this is a similar question to the same problem in sql-server-connection-jaspersoft-studio however it is not an architecture problem as the driver works the first time and the JDK and the sqljdbc_auth.dll are the correct identical architectures. Here is the full stack trace and JDBC Url:

 

jdbc:sqlserver://sqltest.domain.local:1433;instanceName=DOMAIN;databaseName=TestDB;integratedSecurity=true



com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:76549b69-e848-404f-9a02-64341a768b76
net.sf.jasperreports.engine.JRException: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:76549b69-e848-404f-9a02-64341a768b76
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:130)
at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:128)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:162)
at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:59)
at java.lang.Thread.run(Unknown Source)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:76549b69-e848-404f-9a02-64341a768b76
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:168)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:128)
... 4 more
Caused by: java.lang.UnsatisfiedLinkError: Native Library C:\Windows\sqljdbc_auth.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)
... 15 more

epainley's picture
Joined: Sep 20 2015 - 8:20pm
Last seen: 6 years 2 weeks ago

Anyone? I find it hard to believe nobody is using SQL server.

epainley - 6 years 3 weeks ago

Plz also provide solution for eclipse IDE.....which directory should i follow to paste jdbc driver and authentication dll....while m using jaspersoft plugin in

Eclipse IDE

s4saddamk - 4 years 5 months ago

2 Answers:

3

Probably not the best solution but place the sqljdbc4.jar in C:\Program Files (x86)\TIBCO\Jaspersoft Studio-6.1.0.final\features\jre.win32.win32.x86.feature_1.7.0.u80\jre\lib\ext and the sqljdbc_auth.dll in C:\Program Files (x86)\TIBCO\Jaspersoft Studio-6.1.0.final\features\jre.win32.win32.x86.feature_1.7.0.u80\jre\bin

epainley's picture
Joined: Sep 20 2015 - 8:20pm
Last seen: 6 years 2 weeks ago
0

I used the above construction with driver 4.2 and it worked

iman.gharib's picture
Joined: Nov 18 2015 - 3:46am
Last seen: 11 months 4 days ago
Feedback
randomness