db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject Re: Auto Commit + Transaction Problems
Date Mon, 20 Dec 2004 17:50:26 GMT




Hi,

One reason could be that you do not commit /rollback a connection before
giving it back to the pool, and the pool does not do a commit/rollback, and
you fetch the connection again and the pool tries to set transaction
isolation or something similar.
Another reason might be that are you explicitly using any "set Transaction
..." statement, and it is not the first statement in the transaction. This
can happen e.g. if you use testOnBorrow = true.

   Thomas

"Ferruh Zamangoer" <ferruh.zamangoer@gistec-online.de> schrieb am
20.12.2004 18:31:12:

> Hi NG,
>
> is there any way in Torque to turn on auto commit? We have the problem
that
> we become the following Exception, when we want to insert a dataset into
the
> database.
>
> java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste Anweisung
der
> Transaktion sein
>    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:579)
>    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
>    at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1094)
>    at
>
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2132

> )
>    at
>
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2015)

>    at
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java

> :2877)
>    at
>
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState

> ment.java:608)
>    at
>
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j

> ava:684)
>    at
>
oracle.jdbc.driver.OracleConnection.setReadOnly(OracleConnection.java:1579)
>    at
>
org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.setReadOnly(ConnectionImp

> l.java:392)
>    at
>
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa

> taSource.java:490)
>    at
>
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa

> taSource.java:458)
>    at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)
>    at org.apache.torque.Torque.getConnection(Torque.java:306)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1496)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1448)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1411)
>    at
com.gistec.geomisservice.PtFreetextPeer.doInsert(PtFreetextPeer.java:33)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setPtText(DataInserter.java:461)
>    at
>
com.gistec.geomisservice.sync.DataInserter.createCI_Citation(DataInserter.ja

> va:5420)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setCI_Citation(DataInserter.java:

> 5393)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setFeatureTypeB44(DataInserter.ja

> va:3208)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setAttributeTypeB44(DataInserter.

> java:3150)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setGF_AttributeType(DataInserter.

> java:3093)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMD_DescriptionList(DataInserte

> r.java:2962)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMD_MaintenanceInformation(Data

> Inserter.java:998)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMetdataMaintenance(DataInserte

> r.java:1332)
>    at
>
com.gistec.geomisservice.sync.DataInserter.doInsert(DataInserter.java:124)
>    at
>
com.gistec.geomisservice.sync.DataSync.metaDataMustBeInserted(DataSync.java:

> 248)
>    at com.gistec.geomisservice.sync.DataSync.syncData(DataSync.java:197)
>    at
com.gistec.geomisservice.TestClient.LogicTest.main(LogicTest.java:86)
> rethrown as org.apache.torque.TorqueException: ORA-01453: SET TRANSACTION
> muss erste Anweisung der Transaktion sein
>    at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:755)
>    at org.apache.torque.Torque.getConnection(Torque.java:306)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1496)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1448)
>    at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1411)
>    at
com.gistec.geomisservice.PtFreetextPeer.doInsert(PtFreetextPeer.java:33)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setPtText(DataInserter.java:461)
>    at
>
com.gistec.geomisservice.sync.DataInserter.createCI_Citation(DataInserter.ja

> va:5420)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setCI_Citation(DataInserter.java:

> 5393)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setFeatureTypeB44(DataInserter.ja

> va:3208)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setAttributeTypeB44(DataInserter.

> java:3150)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setGF_AttributeType(DataInserter.

> java:3093)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMD_DescriptionList(DataInserte

> r.java:2962)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMD_MaintenanceInformation(Data

> Inserter.java:998)
>    at
>
com.gistec.geomisservice.sync.DataInserter.setMetdataMaintenance(DataInserte

> r.java:1332)
>    at
>
com.gistec.geomisservice.sync.DataInserter.doInsert(DataInserter.java:124)
>    at
>
com.gistec.geomisservice.sync.DataSync.metaDataMustBeInserted(DataSync.java:

> 248)
>    at com.gistec.geomisservice.sync.DataSync.syncData(DataSync.java:197)
>    at
com.gistec.geomisservice.TestClient.LogicTest.main(LogicTest.java:86)
> Caused by: java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste
> Anweisung der Transaktion sein
>    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:579)
>    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
>    at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1094)
>    at
>
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2132

> )
>    at
>
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2015)

>    at
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java

> :2877)
>    at
>
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState

> ment.java:608)
>    at
>
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j

> ava:684)
>    at
>
oracle.jdbc.driver.OracleConnection.setReadOnly(OracleConnection.java:1579)
>    at
>
org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.setReadOnly(ConnectionImp

> l.java:392)
>    at
>
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa

> taSource.java:490)
>    at
>
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa

> taSource.java:458)
>    at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)
>    ... 18 more
>
>
> Can anybody tell us what is going wrong is there any problem in the code
or
> is has the database some problems by executing the statements.
>
> Thanks for any help in advance.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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


Mime
View raw message