简体   繁体   English

SQLXML的AbstractMethodError

[英]AbstractMethodError for SQLXML

I need to add xml data in sql server 2008 and i'm using jre 6 as runtime in eclipse IDE. 我需要在sql server 2008中添加xml数据 ,并且在Eclipse IDE中使用jre 6作为运行时。

When i run my programs, i get this error: 当我运行程序时,出现此错误:

" java.lang.AbstractMethodError: net.sourceforge.jtds.jdbc.ConnectionJDBC3.createSQLXML()Ljava/sql/SQLXML;" “ java.lang.AbstractMethodError:net.sourceforge.jtds.jdbc.ConnectionJDBC3.createSQLXML()Ljava / sql / SQLXML;”

for connection i'm using ojdbc14.jar. 对于连接,我正在使用ojdbc14.jar。

What is the problem here ? 这里有什么问题 ?

SQLXML is a JDBC 4 feature not supported in JDBC 3. SQLXML是JDBC 3不支持的JDBC 4功能。

JTDS is a JDBC 3 driver. JTDS是JDBC 3驱动程序。

http://sourceforge.net/p/jtds/feature-requests/65/ http://sourceforge.net/p/jtds/feature-requests/65/

They have removed the AbstractMethodErrors during their build process, but from what I can tell they have not done a release since they fixed that bug, so the current release still has the problem. 他们在构建过程中删除了AbstractMethodErrors,但是据我所知,由于他们已修复该错误,因此尚未完成发布,因此当前版本仍然存在问题。 Not sure if the method would then just be a NOOP or throw an UnsupportedOperationException. 不知道该方法是否只是NOOP或抛出UnsupportedOperationException。 Either way it would not help you since the result would still be a dead end (ie, no desired functionality). 无论哪种方式都无济于事,因为结果仍然是死胡同(即没有所需的功能)。

I am still working on getting it working, but apparently if you want to save XML to SQL Server as an XML type, then you have to use the MS JDBC driver. 我仍在努力使其正常运行,但是显然,如果您要将XML作为XML类型保存到SQL Server,则必须使用MS JDBC驱动程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM