Hi,

I'm currently trying to improve my app performances and I therefore tried to
set the batch-mode property in the repository to "true". Unfortunately,
whenever OJB attempts to submit the batch, I get the following exception:

java.lang.IllegalArgumentException: object is not an instance of declaring
class
        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.ojb.broker.util.batch.PreparedStatementInvocationHandler.doExecut
e(Unknown Source)
        at
org.apache.ojb.broker.util.batch.PreparedStatementInvocationHandler.invoke(U
nknown Source)
        at $Proxy0.doExecute(Unknown Source)
        at
org.apache.ojb.broker.util.batch.BatchConnection.executeBatch(Unknown
Source)
        at
org.apache.ojb.broker.util.batch.BatchConnection.nextExecuted(Unknown
Source)
        at
org.apache.ojb.broker.util.batch.PreparedStatementInvocationHandler.invoke(U
nknown Source)
        at $Proxy0.executeUpdate(Unknown Source)
        at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown
Source)Notif 4240 - act: 4832

        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown
Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
        at Test.main(Test.java:110)


I am using Oracle 8i and OJB 1.0rc4.
Here is an excerpt from my repository:

        <jdbc-connection-descriptor
                default-connection="true"
                jcd-alias="bod"
                platform="oracle"
                jdbc-level="2.0"
                driver="oracle.jdbc.driver.OracleDriver"
                protocol="jdbc"
                subprotocol="oracle:thin"
                dbalias="@superbug:1521:dbmaster"
                username="SEJ"
                password="SEJ"
                batch-mode="true"
            >
                <connection-pool
                    maxActive="15"
                    whenExhaustedAction="0"
                    testOnBorrow="false"
                    testOnReturn="false"
                    validationQuery="select count(*) from OJB_HL_SEQ"
                />

                <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerInMemoryImpl">
                                    <attribute attribute-name="autoNaming"
                                    attribute-value="true"/>
                </sequence-manager>


        </jdbc-connection-descriptor>


Here is a code excerpt:

        broker.beginTransaction();
        broker.serviceConnectionManager().setBatchMode(true);
        broker.store(o);
        broker.commitTransaction();


My question: can I use batch-mode with Oracle, and if so, do I use the right
driver...

Thanks in advance.
Regards
Stiphane El Guedj


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to