Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: David Harper <devnull@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 03 Oct 2007 06:27:27 GMT
pjvleeuwen@xxxxxxxxx wrote:
DavidThrown when an application tries to call an abstract method. Normally,
this error is caught by the compiler; this error can only occur at run
version when running it. Check your compile-time and run-timeThanks, but I only *have* one version. I guess the MySQL Connection\J
classpaths to ensure that they both reference the newer version of the
JAR file.
guys felt that the next "*Normally* this error..." was optional. :)
I suspect that I wasn't thinking clearly last night. Sorry. Here's a more likely explanation.
Your code never refers directly to the concrete implementation classes in the Connector/J JAR file (such as com.mysql.jdbc.Driver) but only to the classes (actually, mostly interfaces, like java.sql.Driver) in java.sql.* and javax.sql.*
Therefore, your compiler will have no reason to check any of the classes in the Connector/J JAR file, and the abstract method problem is not detected at compile time. Remember that java.sql.ResultSet, like java.sql.Driver, is an interface, not a class.
You only hit the abstract method problem when you actually run your code, and the Java virtual machine needs to load the concrete classes such as com.mysql.jdbc.Driver, which implements the java.sql.Driver interface.
When your program reaches the call to ResultSet.updateBlob at line 52, the JVM attempts to call the method updateBlob on a concrete com.mysql.jdbc.UpdatableResultSet object. That method is apparently abstract, and you get the mysterious AbstractMethodError.
I hope this makes better sense :-)
David Harper
Cambridge, England
.
- Follow-Ups:
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- References:
- com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: David Harper
- Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- From: pjvleeuwen@xxxxxxxxx
- com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Prev by Date: Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Next by Date: Searching CLOBs through Hibernate
- Previous by thread: Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Next by thread: Re: com.mysql.jdbc.UpdatableResultSet.updateBlob gives AbstractMethodError
- Index(es):
Relevant Pages
|