0

I'm using Maven to install Spring Boot project that uses SQLServer, but Tests phase fails: 'SQLServerException: This driver is not configured for integrated authentication', caused by 'UnsatisfiedLinkError: no sqljdbc_auth in java.library.path'. It happens only while using Maven, not while compiling the project in eclipse. I use maven-surefire-plugin.

I copied sqljdbc_auth windows\sysWOW64 and to Java\jre1.8.0_211\bin and some more libraries, but it doesn't seems to be the solution.

1 Answers1

0

Seems you are not using type-4 JDBC for SQLServer which require platform dependent library loading. I suggest you switch to type-4 SQLSERVER driver so that you only need depends on driver jar. Should be good solution.

Qingfei Yuan
  • 1,196
  • 1
  • 8
  • 12
  • I'm using JDBC for SQLServer, it works, but doesn't works with tests in Maven. – Alberto Barcessat Jul 09 '19 at 14:52
  • how do you configure JDBC for your test? – Qingfei Yuan Jul 09 '19 at 20:52
  • This is included in my application.properites: spring.datasource.url=jdbc:sqlserver://localhost;database=CouponsSystemDB;integratedSecurity=true; spring.datasource.driver-class=com.microsoft.sqlserver.jdbc.SQLServerDriver #spring.datasource.username=root #spring.datasource.password= #spring.jpa.properties.* spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServerDialect #spring.jpa.hibernate.* spring.jpa.hibernate.ddl-auto=update – Alberto Barcessat Jul 10 '19 at 08:42