5

Hi i have following Problem with mssql-jdbc_auth-<Version/Arch>.dll if i manually add it to my path it works but since i use mave this is not the way in wanna go :(.

i put following lines to my pom.xml

    <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>8.4.1.jre14</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc_auth -->
   <dependency>
       <groupId>com.microsoft.sqlserver</groupId>
       <artifactId>mssql-jdbc_auth</artifactId>
       <version>8.4.1.x64</version>
       <type>dll</type>
   </dependency>

the dll is downloaded but seems not loaded :(, because i still run into the SQLServerException: This driver is not configured for integrated authentication Problem. How i can solve this that it just work with maven and not adding the dll on all computers to the path?

Martin_1986
  • 151
  • 1
  • 1
  • 7
  • Got the same problem. Opened an issue here (https://github.com/microsoft/mssql-jdbc/issues/1439) – Bahaa Sep 30 '20 at 14:02

1 Answers1

-2

Without any further information: the driver is neither on PATH nor on java.library.path so System.loadLibrary() cannot load the library to access SSPI functions. Maven does not know that this is a native component which has to be present somewhere.

Michael-O
  • 18,123
  • 6
  • 55
  • 121
  • yes but how i can tell maven to do so it is okay that it doesn't work automatic iam looking for a command to do this. – Martin_1986 Sep 11 '20 at 10:03
  • It depends where and what point in time you want to use the DLL. – Michael-O Sep 11 '20 at 10:11
  • always when i try to connect to a Microsoft SQL Server, so in my all my run configurations. For jpackage i can add it via my build Skript to the runtime – Martin_1986 Sep 11 '20 at 12:24