简体   繁体   English

甚至在导入oracle.sql.blob之后也无法识别GetBlob()方法

[英]GetBlob() method not recognized even after importing oracle.sql.blob

I have a .Java file in an Application where the code which like this 我在应用程序中有一个.Java文件,其中的代码是这样的

blob = ((OracleResultSet) rs).getBLOB("Document");

I have imported oracle.sql.blob. 我已经导入了oracle.sql.blob。 import Oracle.sql.BLOB

But even after that I am having complier error and intellisense suggesting me to Create method 'getBLOB(string)' in type OracleResultSet 但是即使在那之后,我仍然遇到编译器错误和智能提示,建议我在Create method 'getBLOB(string)' in type OracleResultSet

Is this a problem because of JRE system library? 由于JRE系统库,这是一个问题吗? I checked it too... the Jar file is properly added. 我也检查过... Jar文件已正确添加。

Just another point this problem is happening after a fresh installation of Eclipse. 另一个问题是,在全新安装了Eclipse之后会发生此问题。 Do I need to add any additional JAR or perform some configuration? 我是否需要添加任何其他JAR或执行一些配置?

the method signature should be 方法签名应为

Blob getBlob(String columnLabel) throws SQLException

so, try writing the last three letters in lower case: 因此,请尝试以小写形式写出最后三个字母:

blob = ((OracleResultSet) rs).getBlob("Document");

I have upgraded the JDK version of my machine to JDK 7 and it did the trick. 我已经将机器的JDK版本升级到JDK 7,它成功了。 The JRE system library files were not all available with the previous version. JRE系统库文件并非在先前版本中都可用。 No this sort of issues anymore. 不再存在此类问题。

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

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