----------【HIbernate】java.lang.AbstractMethodError: com.microsoft.jdbc.base.BaseDatabaseMetaData.supportsGetGeneratedKeys()Z
解决方案:
问谷老师得知是microsoft提供的数据库驱动存在bug。需要换一种驱动连接,使用jtds(下载地址:http://sourceforge.net/projects/jtds/files/)下载jtds1.2.5版,解压得到jtds-1.2.5.jar,引用到eclipse中项目目录下(去除原驱动引用),更改hibernate配置文件:
原驱动连接配置:
<property name="connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="connection.url">jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=hibernate</property>
更改jtds连接:
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=hibernate</property>
问题得到解决。补充:java代码调原驱动连接数据库是没有问题的,搭配hibernate会有此问题。
分享到:
相关推荐
<CR><LF>FIRMWARE UPDATING<CR><LF> Indicates UE is updating. <CR><LF>FIRMWARE UPDATE SUCCESS<CR><LF> Indicates update success, but not report update state to firmware package server yet.
update_wtl.zip<br>Notes on updating your WTL installation(2KB)<END><br>27,sidebarmenu.zip<br>An article about changing the look of WTL icon menu(85KB)<END><br>28,customdraw.zip<br>How to use WTL to ...
09.zip<br>Print Mailing Labels<br>打印邮件标签(8KB)<END><br>10,10.zip<br>RFX_Date alternative<br>关于RFX_Date(4KB)<END><br>11,11.zip<br>RFX_Date using COleDateTime<br>使用COleDateTime(6KB)<END><br>12,...
<CR><LF>FIRMWARE UPDATING<CR><LF> Indicates UE is updating. <CR><LF>FIRMWARE UPDATE SUCCESS<CR><LF> Indicates update success, but not report update state to firmware package server yet. <CR><LF>...
<br><br> m_hDC = CreateCompatibleDC(0) <br> If (m_hDC <> 0) Then <br> If (CreateDIB(m_hDC, lWidth, lHeight, m_hDIb)) Then <br> m_hBmpOld = SelectObject(m_hDC, m_hDIb) <br> Create = True <br> Else <br...
The problem is related to core components functioning peculiarities after updating Windows 2003 to SP2.<br><br>The issue is fixed in the new Outpost driver.<br><br>Please replace the firewall driver ...
;Windows 2000/XP WDM Modem Setup File ;... 2004-2006 ;Manufacturer: Motorola Inc [Version] Signature = "$Windows NT$" Class = Modem ClassGUID = {4D36E96D-E325-11CE-BFC1-08002BE10318} ...
;Windows 2000/XP WDM Modem Setup File ;... 2004-2006 ;Manufacturer: Motorola Inc [Version] Signature = "$Windows NT$" Class = Modem ClassGUID = {4D36E96D-E325-11CE-BFC1-08002BE10318} ...
Editing and Updating Data <br/> <br/>Chapter 10 - ADO.NET Data-Binding in Windows Forms <br/> <br/>Chapter 11 - Using ADO.NET in Windows Forms <br/> <br/>Chapter 12 - Data-Binding in Web Forms <br/> ...
Software Testing and Continuous Quality Improvement<br><br>SECTION I SOFTWARE QUALITY IN PERSPECTIVE . . . . . . . . . . . . . . . 1<br>1 Quality Assurance Framework. . . . . . . . . . . . . . . . . ....
[SQL Server] <-> [DBLibrary] <-> [SQL Links] <-> [BDE] <-> [Client application]SDAC works directly through OLE DB, which is a native SQL Serverinterface. Applications with SDAC components access ...
<groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.x.y.RELEASE</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</...
Cannot access field <fieldname> as type variant." * TClientDataSet doesn‘t save data to file when FileName is set and there is no existing file on disk (Quality Central 2307). * Using the Delphi...
Java.util.ConcurrentModificationException 异常问题详解 ConcurrentModificationException 异常是 Java 中一个常见的异常,它发生在 Iterator 遍历集合时,集合同时被修改引起的异常。在 Java 中,集合类如 ...
本书不仅提供了丰富的示例代码,还深入探讨了SQL Server中的常见问题及其解决方案。 #### 核心章节概览 **1. Getting Started with SELECT** - **基础查询**: 介绍如何使用`SELECT`语句进行基本的数据检索。 - **...
|<3> Delete File | |<0> Exit To Main Menu | ============================================================================ Enter your choice(0-3): 3 【bootware模式下按3删除已经上传的文件】 Deleting...
$ go build mitV.go#跑步 $ mitV.exe <GithubOauthToken> <repo> <host>> <update>eg.$ mitV.exe <token> Matt-Allen44/mitV 127.0.0.1:8080 10 This would launch a server watching commits to this repo, and ...
echo ("<P>Unable to connect to the databases server at this time.</P>"); exit(); } ``` 这样,如果连接失败,则会显示错误消息并终止脚本的执行。 ### 使用 @ 符号抑制错误 有时为了防止连接失败时出现错误...
此外,文章中还提到了其他一些与数据库管理和故障排除相关的文章链接,比如MySQL的相关问题,如"The server quit without updating PID file",以及SQL Server的其他常见问题,如阻止保存要求重新创建表的更改、远程...
在数据访问层(DAL),我们可以使用LINQ to SQL或Entity Framework来与数据库交互。这里我们以LINQ to SQL为例,创建一个`DataContext`类,该类将包含对数据库的连接以及`Employee`表的映射: ```csharp partial ...