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.
What's up with this? How can I take a NewProxyResultSet and get an OracleResultSet from it?