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

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

问题描述

我的标准免责声明:我在大约10年内没有使用过Java,所以我很可能在这里做了一些基本错误。

My standard disclaimer: I haven't worked with Java in about 10 years, so it's very probable I'm doing something elementary wrong here.

我写的 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.

但是

当我把SFSextensions文件夹中的服务器端扩展(根据规范),我得到一个 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.".

我用Google搜索了这个错误,发现这通常是因为文件 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版本的一种快捷方法是查看其中一个或两个文件夹 C:\Program Files \ Java C:\Program Files(x86)\ Java @ / code>存在。当然,如果两个文件夹都存在,那对你没什么帮助。

One quick way to determine which version(s) of Java you have installed is to see whether either or both of the folders C:\Program Files\Java or C:\Program Files (x86)\Java exist. Of course, if both folders exist, that's not much help to you.

如果使用x86版本的sqljdbc_auth.dll而不是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天全站免登陆