0

The production scenario:

OS: RedHat, 
JRE: 1.7, 
sqljdbc: 4, 
Tomcat 6

development environment:

windows 7, 
jre 1.7, 
sqldjbc: 4

target database: MS SQL 2012

I have a java application with Orchestration Designer from Avaya running on my eclipse in the dev environment. It makes a insert in the database using the sqljdbc4.jar driver.

It uses Windows Authentication but with a different user from my computer:

Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver Connection URL: jdbc:sqlserver://10.0.220.188;databaseName=DBIVR;integratedSecurity=true;domain=LAB; Username: prueba
Password: prueba

The thing is that on my computer it works perfectly and inserts correctly in the database, so then I export the war file and deploy it to the tomcat on the production environment and an error occurs, the driver is located under: /usr/share/tomcat6/lib/sqljdbc4.jar

error:

Runtime Error : 
javax.servlet.ServletException: EXCEPTION> com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:522aab27-1d31-4cba-90cd-4ad3be01e349 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667) at com.microsoft.sqlserver.jdbc.AuthenticationJNI.(AuthenticationJNI.java:60) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229) at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:221) at org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205) at org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:150) at org.apache.tomcat.dbcp.dbcp.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:836) at org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource.registerPool(PerUserPoolDataSource.java:492) at org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource.getPooledConnectionAndInfo(PerUserPoolDataSource.java:382) at org.apache.tomcat.dbcp.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:701) at org.apache.tomcat.dbcp.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:676) at com.avaya.sce.runtime.jdbc.Database.open(Database.java:61) at com.avaya.sce.runtime.jdbc.Database.open(Database.java:99) at com.avaya.sce.runtime.connectivity.db.DbQuery.executeSQL(DbQuery.java:191) at com.avaya.sce.runtime.connectivity.db.DbQuery.execute(DbQuery.java:134) at com.avaya.sce.runtime.Data.evaluateActions(Data.java:191) at flow.untitledData1.executeDataActions(untitledData1.java:83) at com.avaya.sce.runtime.Data.handleRequest(Data.java:104) at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96) at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:282) at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:189) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at com.microsoft.sqlserver.jdbc.AuthenticationJNI.(AuthenticationJNI.java:35) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229) at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:221) at org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205) at org.apache.tomcat.dbcp.dbcp.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:833) at org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource.registerPool(PerUserPoolDataSource.java:492) at org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource.getPooledConnectionAndInfo(PerUserPoolDataSource.java:382) at org.apache.tomcat.dbcp.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:701) at com.avaya.sce.runtime.jdbc.Database.open(Database.java:94) ... 22 more 

So is it possible that i use this authentication from red hat? What am I missing?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Integrated security requires Windows authentication, which requires a windows system + the right dll. So this is not going to work on Linux. There is also an option to use Kerberos authentication instead (see https://msdn.microsoft.com/en-us/library/gg558122%28v=sql.110%29.aspx ), but I am not sure if this is actually available from Linux. You might be better off using SQL authentication. – Mark Rotteveel Jan 24 '15 at 12:33
  • I recently answered a sort-of-similar question [here](http://stackoverflow.com/q/26274472/2144390) concerning jTDS. Perhaps it might give you some ideas. – Gord Thompson Jan 25 '15 at 22:18

0 Answers0