Hi Community,
I’m rather new to Hibernate and currently exploring all the functionalities but I do have one issue where I’m stuck and I hope someone can point me in the right direction. Hibernate tools are always throwing an error when I try to connect to my MS SQL Server DB using integrated Security (Windows Authentication) in the “Hibernate Configurations”-View in Eclipse.
The error indicates that the “sqljdbc_auth.dll” file is already loaded in another classloader. I can’t figure out why and where this happens and ultimately how to solve this.
I’m running the following setup:
Eclipse Photon 4.8.0
Hibernate Tools 5.4.7
JDK 1.8 x64
MS SQL JDBC 6.0 Driver (tried different versions as well, including the latest one)
As a side note: Connecting to the DB from the Java Code itself (using Hibernate) is working properly. It’s only the Hibernate Tools which I can’t get working.
The full stack trace of the error-message:
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
Error calling Driver#connect
org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
Error calling Driver#connect
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:dd9decbd-2588-47e9-ae06-caadcb27472e
This driver is not configured for integrated authentication. ClientConnectionId:dd9decbd-2588-47e9-ae06-caadcb27472e
java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\Java\jre1.8.0_231\bin\sqljdbc_auth.dll already loaded in another classloader
Native Library C:\Program Files\Java\jre1.8.0_231\bin\sqljdbc_auth.dll already loaded in another classloader
Would be glad if someone has any Idea how this can be solved.
Many thanks
Jan