UnsatisfiedLinkError:java.library.path 中没有 sqljdbc_auth [英] UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

查看:63
本文介绍了UnsatisfiedLinkError:java.library.path 中没有 sqljdbc_auth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Maven 安装使用 SQLServer 的 Spring Boot 项目,但测试阶段失败:SQLServerException:此驱动程序未配置用于集成身份验证",由UnsatisfiedLinkError:java.library.path 中没有 sqljdbc_auth"引起.它仅在使用 Maven 时发生,在 eclipse 中编译项目时不会发生.我使用 maven-surefire-plugin.

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.

我将 sqljdbc_auth windows\sysWOW64 复制到 Java\jre1.8.0_211\bin 和其他一些库,但它似乎不是解决方案.

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.

推荐答案

似乎您没有使用 type-4 JDBC 用于需要平台相关库加载的 SQLServer.我建议你切换到 type-4 SQLSERVER 驱动程序 这样您就只需要依赖驱动程序 jar.应该是很好的解决方案.

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.

这篇关于UnsatisfiedLinkError:java.library.path 中没有 sqljdbc_auth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆