It's all about the answers!

Ask a question

CLM databases can't connect because dll not found


Daryl Walters (2112) | asked Mar 21 '18, 11:38 a.m.

 We're running CLM 6.0.5 on Windows Server 2012 R2 with SQL Server.  In performing the installation the JTS database is able to connect without an issue.  However, on running the setup steps where the applications are configured we're seeing a database connection errors.  


The server was unable to connect to the database because the database connection settings are invalid or because database is unreachable (SQLSTATE: 08S01, SQLCODE: 0). Verify the connection settings in your teamserver.properties file. See the Jazz Team Server log for more information.ID CRJAZ2654E

Looking the logs there are errors like:

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:22af460a-6073-4054-98c5-f718833ee7e6
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1669)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:61)
...  and further down....
at java.lang.Thread.run(Thread.java:785)
Caused by: java.lang.UnsatisfiedLinkError: sqljdbc_auth (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1348)

Why would the JTS database connection work fine, while the other applications cannot connect?  Thanks in advance.



Comments
Donald Nong commented Mar 22 '18, 11:43 p.m.

Unless you modify the JTS teamserver.properties file before running /jts/setup, JTS connects to the bundled Derby database first. Please double check whether JTS actually connects to SQL Server. Also, is this an all-in-one deployment or distributed? If all-in-one and you still see this error, it is hard to explain. Some claimed that copying the sqljdbc_auth.dll file to the JRE's "bin" folder resolved the issue but I don't think it's the right approach.


Daryl Walters commented Mar 27 '18, 4:07 p.m.

I've configured JTS to not use the sqljdbc_auth.dll and it can now connect to the database.  I've attempted to have other applications use it, but if there is more than one attempting to load the dll, the other applications will report an error like:


 com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:37b3fcce-f715-4839-9a85-a9e045e3d99d
... followed by a 

Caused by: java.lang.UnsatisfiedLinkError: sqljdbc_auth (Library is already loaded in another ClassLoader)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1348)

further down in the log file.  It appears that if one of the CLM apps loads this, others can not.  I've placed the dll in the JRE bin folder but that didn't matter.  I've also set up a java.library.path in the server.startup script, but I run into the same problem.


Donald Nong commented Mar 27 '18, 8:56 p.m.

Are you using WAS? To avoid loading libraries used by WAS but of different versions, we usually set the class loader policy to "parent last" and that's probably the reason you see the class loader error mentioned above. Setting it to "parent first" may get rid of the error but it may introduce other unwanted behaviors. I think you should contact IBM Support to get it properly investigated.


Daryl Walters commented Mar 28 '18, 8:28 a.m.

Currently we're trying to use WAS Liberty for this CLM installation, as we've used that for other deployments with success.  I've contacted IBM support already, but so far no information on how to configure this to allow the dll to be used by more than just one of the CLM applications on this server. 


Donald Nong commented Mar 29 '18, 4:30 a.m.

If you use JDBC connections, I think you cannot avoid this because each CLM application maintains its own JDBC connections. If you have to use WAS, try to switch to J2EE container so that only WAS itself will load the JDBC driver.
https://jazz.net/wiki/bin/view/Main/JDBCWASPoolType2
I cannot find any up-to-date version of this document, but you should get the idea.


Daryl Walters commented Apr 03 '18, 8:12 a.m.

 Is it possible to use a J2EE container with Liberty?  How do you go about setting up this container?


Donald Nong commented Apr 04 '18, 3:45 a.m.

I'm not aware of such feature in Liberty, unfortunately.

showing 5 of 7 show 2 more comments

Be the first one to answer this question!


Register or to post your answer.