ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tegan Clark <tegan.cl...@yahoo.com>
Subject ParameterSetter.getPreparedStatement()
Date Thu, 14 Dec 2006 23:40:26 GMT
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




 
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.
Mime
View raw message