sqljdbc4与linux集成的身份验证

时间:2015-01-24 00:01:14

标签: java sql linux eclipse jdbc

制作方案:

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

开发环境:

windows 7, 
jre 1.7, 
sqldjbc: 4

目标数据库:MS SQL 2012

我有一个Java应用程序,其中包含来自Avaya的Orchestration Designer在我的eclipse环境中运行。它使用sqljdbc4.jar驱动程序在数据库中进行插入。

它使用Windows身份验证,但使用与我的计算机不同的用户:

  

驱动程序类名:com.microsoft.sqlserver.jdbc.SQLServerDriver   连接网址:   JDBC:SQLSERVER://10.0.220.188;的databaseName = DBIVR; integratedSecurity = TRUE;域= LAB;   用户名:prueba
  密码:prueba

问题是在我的计算机上它运行正常并在数据库中正确插入,因此我导出war文件并将其部署到生产环境中的tomcat并发生错误,驱动程序位于:/ usr /share/tomcat6/lib/sqljdbc4.jar

错误:

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 

那么我可以使用red hat的身份验证吗?我错过了什么?

0 个答案:

没有答案