You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Bryan Lewis <jb...@gmail.com> on 2009/06/30 01:29:02 UTC

ClassCastException with OracleLOBBatchAction

One more bug report related to Oracle, although this one might not be
specific to Oracle8.

DataDomainActionBuilder.batchAction calls delegate.batchAction():

    public SQLAction batchAction(BatchQuery query) {
        return new DataDomainBatchAction(domain, (BatchAction)
delegate.batchAction(query));
    }

That delegate, OracleActionBuilder in our case, has some special handling:

    if (OracleAdapter.isSupportsOracleLOB() &&
OracleAdapter.updatesLOBColumns(query)) {
            return new OracleLOBBatchAction(query, getAdapter());

That class does not extend BatchAction (unlike the normal OracleBatchAction
case) and the BatchAction cast fails.

It appears to be a simple non-data-dependent bug.  The
DataDomainActionBuilder is new code in 3.0.  Either it shouldn't cast to
BatchAction, or OracleLOBBatchAction should extend BatchAction.

I've worked around it for our purposes by telling the OracleAdapter that
supportsOracleLOB is false.

I'll create a Jira.