【发布时间】:2011-11-04 10:11:07
【问题描述】:
我正在尝试使用 jtds 驱动程序将 Netbeans 设置为与 Hibernate 一起使用以连接到 SQLSERVER 2008。
sqlserver 2008是本地安装的,没有用户名密码。
这是hibernate.cfg:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:jtds:sqlserver://localhost:2545/MyDB</property>
</session-factory>
</hibernate-configuration>
当我尝试使用 Hibernate 逆向工程向导设置 Hibernate 逆向工程文件时,我收到以下错误:
无法连接。无法建立连接到 jdbc:jtds:sqlserver://localhost:2545/MyDB 使用 net.sourceforge.jtds.jdbc.Driver(I/O 错误:SSO 失败:本机 SSPI 库未加载。检查 java.library.path 系统属性。)。
我在 WINDOWS\system32 中有 ntlmauth.dll。
【问题讨论】:
-
您对此有什么解决方案吗?逆向工程向导在使用 jTDS 驱动程序时不执行任何操作,并且与 MS 驱动程序一起工作。
标签: java hibernate netbeans jtds