JDBC SQLServerException: “此驱动程序未配置为集成身份验证." [英] JDBC SQLServerException: "This driver is not configured for integrated authentication."

查看:92
本文介绍了JDBC SQLServerException: “此驱动程序未配置为集成身份验证."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 SmartFoxServer (SFS) 编写服务器端扩展".在我的登录脚本中,我需要连接到 MS SQL Server,我正尝试使用 JDBC 进行连接.我已经在我的调试环境中测试了 JDBC 代码,它运行良好.

I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC code in my debug environment, and it works fine.

但是

当我将服务器端扩展放在 SFS扩展"文件夹中时(根据规范),我收到一个 com.microsoft.sqlserver.jdbc.SQLServerException:

When I put the server-side extension in the SFS "extensions" folder (as per spec), I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException:

此驱动程序未配置为集成身份验证.".

"This driver is not configured for integrated authentication.".

我搜索了这个错误,发现通常是因为文件sqljdbc_auth.dll不在系统路径中;我已经把这个文件复制到系统路径下的文件夹中了,还是不行!

I Googled for this error, and found that it's usually because the file sqljdbc_auth.dll is not in the system path; I have copied this file into a folder in my system path, and still it does not work!

还有其他建议吗?

推荐答案

对于不同的处理器架构 (x86/x64/ia64),有不同版本的 sqljdbc_auth.dll.您在 SFS 服务器上使用的是哪一个?

There are different versions of sqljdbc_auth.dll for different processor architectures (x86/x64/ia64). Which one are you using on your SFS server?

您必须选择与运行 SFS 的 JVM 架构相匹配的一种.因此,如果您在 64 位机器上运行 32 位 Java,您将需要 x86 版本,而不是 x64 版本.

You must choose the one to match the architecture of the JVM under which SFS is running. So, if you're running 32-bit Java on a 64-bit machine, you'll need the x86 version, not the x64 version.

我之前没有使用过SFS,所以我不知道它是否会在任何地方写入任何日志.如果是这样,可能值得查看这些日志,看看是否有任何有用的内容写入其中.

I've not used SFS before, so I don't know whether it writes any logs anywhere. If it does, it might be worth taking a look at these logs to see if anything helpful has been written to them.

编辑:我不能 100% 确定 SFS 使用的是 64 位 Java,因为它用完了 C:Program Files 而不是 C:Program Files (x86).

EDIT: I can't be 100% sure that SFS is using 64-bit Java just because it runs out of C:Program Files as opposed to C:Program Files (x86).

我在 SFS 文档 的介绍 > 要求和安装下找到了以下行.虽然这一行仅适用于 Linux 而不是 Windows,但它可能表明 Windows 上的 SFS 也使用 32 位 Java:

I found the following line in the SFS docs under Introduction > Requirements and Installation. Whilst this line applies only to Linux as opposed to Windows, it might suggest that SFS on Windows also uses 32-bit Java:

自 1.5 版以来,SmartFoxServer 带有自己的 x86 32 位 Sun Java Runtime.

Since version 1.5 SmartFoxServer comes with its own x86 32-bit Sun Java Runtime.

确定您安装的 Java 版本的一种快速方法是,在您的 cmd 中输入以下命令:Java -version

One quick way to determine which version(s) of Java you have installed is, give the following command in your cmd: Java -version

它将向控制台显示以下内容:

It will display the following to the console:

C:Users967097>java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

这里可以看到安装的java版本的位类型.

Here,you can see the bit type of the java version installed.

如果您使用 sqljdbc_auth.dll 的 x86 版本而不是 x64 版本,您的应用程序是否可以工作?如果它突然开始使用 x86 DLL,那么 SFS 必须使用 32 位 Java.

Does your application work if you use the x86 version of sqljdbc_auth.dll instead of the x64 version? If it suddenly starts working with the x86 DLL, then SFS must be using 32-bit Java.

是否有用于启动 SFS 的批处理文件?如果是这样,通读一遍可能有助于指出 SFS 从哪里运行 Java.还要注意对 PATH 的任何更改.Java 只能在 java.library.path 系统属性中加载 DLL,在 Windows 上,这被设置为 PATH 环境变量的值.

Is there a batch-file used to start SFS? If so, reading through that might help point out where SFS is running Java from. Also look out for any changes to the PATH. Java can only load DLLs in the java.library.path system property, and on Windows, this is set to the value of the PATH environment variable.

如果您仍然无法确定 SFS 使用的是 32 位还是 64 位 Java,请尝试使用 Process Explorer 查看运行 SFS 的 java.exe 进程的启动环境.

If you still can't determine whether SFS is using 32-bit or 64-bit Java, try using Process Explorer to look at the environment that the java.exe process running SFS was started with.

这篇关于JDBC SQLServerException: “此驱动程序未配置为集成身份验证."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆