Oracle non-standard JDBC calls are a real pain!  You'll have to do different
things depending on the logging level in iBATIS and the datasource that you
use.  See this for more detailed information:

http://www.mail-archive.com/[email protected]/msg06898.html

Jeff Butler



On 12/14/06, Tegan Clark <[EMAIL PROTECTED]> wrote:

 Hi,

I'm implementing a custom type handler to map to custom types in Oracle
stored procedure calls.

I've implemented TypeHandlerCallback and the setParameter method.

My problem is that when I try to get a handle to the underlying prepared
statement:

    public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
        OraclePreparedStatement preparedStatement =
(OraclePreparedStatement) setter.getPreparedStatement();

i get a class cast exception because ParameterSetter.getPreparedStatement()
is returning a proxy ($proxy5), rather than the concrete Oracle
implementation.

I've used an approach almost identical to the one on the iBatis wiki at:


http://opensource.atlassian.com/confluence/oss/display/IBATIS/XMLTypeHandlerCallback.java

That code would have exactly the same problem as I'm having.  I'm using
iBatis 2.2.0.638.

Anyone come across this before?

All help greatly appreciated.

Tegan

------------------------------
Have a burning question? Go to Yahoo! 
Answers<http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx>and
 get answers from real people who know.

Reply via email to