#78 c3p0 ResultSet.unwrap throws an AbstractMethodError

open
nobody
None
5
2009-12-28
2009-12-28
Anonymous
No

I have a ResultSet object that I need to turn into an OracleResultSet so that I can call the getOPAQUE(String) method on it. I'm using c3p0 as my connection pool. The problem is that c3p0 wraps ResultSets in NewProxyResultSet objects.

This shouldn't be a problem because I should just be able to call unwrap on the ResultSet like this:

rs.unwrap(OracleResultSet.class)

However, that doesn't work. It actually throws an AbstractMethodError:

java.lang.AbstractMethodError: com.mchange.v2.c3p0.impl.NewProxyResultSet.unwrap(Ljava/lang/Class;)Ljava/lang/Object;

It includes a stack trace, but it's not helpful because the top line of the stack trace just points to the exact line on which I call the unwrap method. That seems to indicate that NewProxyResultSet itself does not have unwrap implemented.

Is that expected bahavior? It seems like a bug to me. How can I take a NewProxyResultSet and get an OracleResultSet from it?

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks