Jump to content

Cannot connect to SQLServer with Windows authentication via JDBC


rene.j.bosch_1

Recommended Posts

Returning to Jasperreports after many years (back then using iReports) I have problems connecting to SQL Server.

Both when using the JTDS or the Microsoft JDBC driver I cannot get a connection to my local SQL Server Express instance using WIndows Authentication.  It returns the dreaded "This driver is not configured for integrated authentication" (for the MS driver) or "SSO failed: native SSPI Library not loaded" (JTDS) messages.
With other applications (such as SQL Workbench/J) it works like a charm by placing the respective DLL files in the JRE's bin directory (which in that case is a Java 12).
In the case of Jaspersoft Studio I placed them a) in the top directory of JasperSoft, b) in its JRE 1.8 bin directory, c) in WindowsSystem32,  d) added it to the java.library.path,  e) several places in/within the myreports directory, but all to no avail.

The funny thing is that a Test in the data adapter seems to work fine the first time you press it ("Succesful!" message, albeit that it is returned suspiciously quickly).  But a second press gets the before mentioned errors.

Is there some hidden place I need to store the dll files?

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Jaspersoft Studio and Jaspersoft Server are different.  You will need to install the drivers on the server.

https://community.jaspersoft.com/wiki/downloading-and-installing-database-drivers

There are two different drivers dependent on your version of SQL (old SQL and 2005 and above SQL)

Copy the JDBC driver directly onto the tomcat server path and rebooted the server to resolve.

JDBC 6.0 uses the same JDBC 4.1 java libraries.

Copy: sqljdbc41.jar to wherever you Tomcat library files are.

Mine was installed to:

C:Jaspersoftjasperreports-server-cp-7.2.0apache-tomcatlib

Create connection string.  Test SQL Server account before testing Active Directory integration.

connection1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...