This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 201203200400) VM: Java HotSpot(TM) 64-Bit Server VM, 20.6-b02, Java(TM) SE Runtime Environment, 1.6.0_31-rev-b23 OS: Windows 7 User Comments: GUEST: even using thin driver not able to view image data Stacktrace: java.lang.AbstractMethodError: oracle.sql.BLOB.free()V at org.netbeans.modules.db.dataview.util.DBReadWriteHelper.readResultSet(DBReadWriteHelper.java:227) at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.loadDataFrom(SQLExecutionHelper.java:511) at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.initialDataLoad(SQLExecutionHelper.java:135) at org.netbeans.modules.db.dataview.output.DataView.create(DataView.java:105) at org.netbeans.modules.db.dataview.api.DataView.create(DataView.java:74) at org.netbeans.modules.db.sql.execute.SQLExecuteHelper.execute(SQLExecuteHelper.java:116)
Created attachment 116982 [details] stacktrace
Hey, I asume this is what happend: 1. netbeans was compiled with java6 (there the method "free" is defined in the java.sql.Blob interface) 2. the oracle jdbc driver was compiled against jdk 5 or lower (there the interface java.sql.Blob misses the above method) At runtime the bytecode references a not existing method in the oracle driver (why no one considered creating java.sql.Blob2?). Long story short: We have to guard calls to java.sql.Blob#free either using reflection or by surrounding the call to free with a try-catch on java.lang.AbstractMethodError. Can you compile netbeans from mercurial checkout? If you can, please try to change line 227 in DBReadWriteHelper.java: blob.free(); to this: try { blob.free(); } catch (java.lang.AbstractMethodError err) { // Blob gained a new method in jdbc4 (drivers compiled // against older jdks don't provide this methid } and try again.
I compiled this module with proposed fix and replace same module in installed build (Build 201203271056). No more exception throws on same action
Thanks for your test! I'll mark this bug as duplicate of bug #206233, as there is the whole issue tracked and a proposed fix placed. *** This bug has been marked as a duplicate of bug 206233 ***