no mssql-jdbc_auth-8.4.1.x64 in java.library.path
Asked Answered
C

0

3

Something is different when I got this error, this instance is running on a tomcat container "tomcat:jdk8-adoptopenjdk-hotspot", I followed multiple ways to copy mssql-jdbc_auth-8.4.1.x64.dll to local java.library.path which is below, but still I'm getting same error.

Which is weird that I copied the same dll on windows with same codes, it worked. The java.library.path suppose to be PATH on windows and LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib on linux, I also printed path to confirm:

this

it's just the instance can not find it.

env settings

LD_LIBRARY_PATH

Caused by: java.lang.UnsatisfiedLinkError: no mssql-jdbc_auth-8.4.1.x64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) ~[?:1.8.0_262]
    at java.lang.Runtime.loadLibrary0(Runtime.java:871) ~[?:1.8.0_262]
    at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_262]
    at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:51) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3942) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:85) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3932) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7375) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3206) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2713) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2362) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2213) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1276) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:861) ~[mssql-jdbc-8.4.1.jre8.jar:?]
    at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.2.jar:?]
    at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-3.4.2.jar:?]
Cheesecake answered 22/10, 2020 at 11:25 Comment(1)
asked same thing on Github, could refer this github.com/microsoft/mssql-jdbc/issues/1453Cheesecake

© 2022 - 2024 — McMap. All rights reserved.