在配置weblogic數據源和連接池時,由于建立連接池采用的weblogic的默認sqlserver jdbc驅動程序weblogic.jdbc.sqlserver.SQLServerDriver,這給我下面的工作帶來很大的麻煩。我在進行session.save()時,提示錯誤 JDBC error: Unsupported method: Connection.prepareStatement ,很是讓我納悶,百思不得其解,后google一下,得到了bea 工程師的解答,如下:
?Well, that's clearly one of them. I would contact Hibernate/Plum Tree
?about this, and ask how many JDBC drivers they've tested this with.
?I would venture an educated guess that many JDBC drivers will not
?be able to completely implement all the JDBC 3.0 methods in the
?spec's wishlist.... MHO,
?Joe Weinstein at BEA Systems
??? 可以看出,bea提供的sqlserver驅動沒有完全實現 jdbc的方法,而hibernate3卻調用了Connection.prepareStatement 方法,碰巧該方法不實現,就出現上述錯誤。