db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert S. Sfeir" <rob...@codepuccino.com>
Subject Yet another Oracle bug?
Date Wed, 04 Feb 2004 18:04:42 GMT
Just got this exception, but my repository does mention CLOB, and it 
looks like it didn't know what to expect from the query

This is my code:

public void updateProject( final ProjectBean projectBean )
            throws DataAccessException
    {
        final PersistenceBroker broker = getBroker();
        try
        {
            broker.beginTransaction();
            final QueryByCriteria query = new QueryByCriteria( 
projectBean );
            final ProjectBean result = ( ProjectBean ) 
broker.getObjectByQuery( query );
            result.setDescription( projectBean.getDescription() );
            result.setName( projectBean.getName() );
            broker.store( result );
            broker.commitTransaction();
        }
        catch( PersistenceBrokerException e )
        {
            if( broker.isInTransaction() )
            {
                broker.abortTransaction();
            }
            throw new DataAccessException.dataStoreException(e);
        }
    }

repository is:

<class-descriptor class="com.codepuccino.tracker.beans.ProjectBean" 
table="CDPCNO_PROJECTS">
        <field-descriptor name="ID" nullable="false" column="project_id" 
jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
        <field-descriptor name="name" nullable="false" 
column="project_name" jdbc-type="VARCHAR" primarykey="false"/>
        <field-descriptor name="description" nullable="true" 
column="project_description" jdbc-type="CLOB" primarykey="false"/>
        <field-descriptor name="createDate" nullable="false" 
column="project_create_date" jdbc-type="TIMESTAMP" primarykey="false"/>
    </class-descriptor>

Connector is:
<jdbc-connection-descriptor jcd-alias="mesquite" 
default-connection="false" platform="Oracle" jdbc-level="3.0" 
driver="oracle.jdbc.OracleDriver" protocol="jdbc" subprotocol="oracle" 
dbalias="thin:@localhost:1521:DOODOO" username="doodoo" 
password="doodoo" eager-release="true" batch-mode="false" 
useAutoCommit="0" ignoreAutoCommitExceptions="false">
        <connection-pool maxActive="5"/>
        <sequence-manager 
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
            <attribute attribute-name="grabSize" attribute-value="100"/>
            <attribute attribute-name="autoNaming" attribute-value="true"/>
            <attribute attribute-name="globalSequenceId" 
attribute-value="false"/>
            <attribute attribute-name="globalSequenceStart" 
attribute-value="10000"/>
        </sequence-manager>
    </jdbc-connection-descriptor>

The exception is:
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException 
during the execution of the query (for a 
com.codepuccino.tracker.beans.ProjectBean): ORA-00932: inconsistent 
datatypes: expected - got CLOB

ORA-00932: inconsistent datatypes: expected - got CLOB

java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got 
CLOB

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at 
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
    at 
oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
    at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
    at 
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at 
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
    at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:321)
    at 
org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.java:113)
    at 
org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:211)
    at 
org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIteratorFactoryImpl.java:97)
    at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:1606)
    at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(PersistenceBrokerImpl.java:1119)
    at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(PersistenceBrokerImpl.java:1222)
    at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:291)
    at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:291)
    at 
com.codepuccino.tracker.sql.ojb.ProjectDAOImpl.updateProject(ProjectDAOImpl.java:103)
    at 
com.codepuccino.tracker.actions.ProjectAction.update(ProjectAction.java:108)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at 
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
    at 
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
    at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
    at java.lang.Thread.run(Thread.java:534)
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got 
CLOB


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message