You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Aleksey Sushko (JIRA)" <ji...@apache.org> on 2014/12/08 23:31:13 UTC
[jira] [Updated] (ARIES-1279) Aries Transactions: Emergency closes
JDBC connection before the transaction is rolled back
[ https://issues.apache.org/jira/browse/ARIES-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Sushko updated ARIES-1279:
----------------------------------
Attachment: transaction-itest.zip
Tests show incorrect operation of the database.
Stack error bit different. But the result is the same.
If the error on the level of queries to the database, the test falls.
If the error in the logic of business process, the test passes.
{code}throw new Exception("send error"); // it's test work OK{code}
> Aries Transactions: Emergency closes JDBC connection before the transaction is rolled back
> ------------------------------------------------------------------------------------------
>
> Key: ARIES-1279
> URL: https://issues.apache.org/jira/browse/ARIES-1279
> Project: Aries
> Issue Type: Bug
> Components: Transaction
> Environment: org.apache.aries.transaction.jdbc:2.1.0
> org.apache.aries.transaction.manager:1.1.0
> org.apache.geronimo.components.geronimo-connector:3.1.1
> Reporter: Aleksey Sushko
> Attachments: transaction-itest.zip
>
>
> ManagedJDBCConnection emergency closes JDBC connection before the transaction is rolled back.
> Create a service of the JDBC DataSource.
> {code}
> <bean id="dataSourceOragnizer" class="oracle.jdbc.pool.OracleDataSource">
> <cm:managed-properties
> persistent-id="oracle_oragnizer"
> update-strategy="component-managed"
> update-method="update"/>
> </bean>
> <service ref="dataSourceOragnizer" interface="javax.sql.DataSource">
> <service-properties>
> <entry key="datasource.name" value="db-organizer"/>
> <entry key="aries.xa.name" value="db-organizer"/>
> <entry key="aries.xa.username" value="test"/>
> <entry key="aries.xa.password" value="test"/>
> <entry key="aries.xa.partitionStrategy" value="by-connector-properties"/>
> </service-properties>
> </service>
> {code}
> In SQL query has a bug.
> {code}
> 2014-12-08 01:04:20,214 | TRACE | l Console Thread | TransactionCachingInterceptor | nd.TransactionCachingInterceptor 97 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | supplying connection from tx cache for tx caching interceptor org.apache.geronimo.connector.outbound.TransactionCachingInterceptor@c4b525e handle: nullManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe]
> 2014-12-08 01:04:20,220 | WARN | l Console Thread | GeronimoConnectionEventListener | .GeronimoConnectionEventListener 89 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | connectionErrorOccurred called with null
> java.sql.SQLException: ORA-00904: "DOC_NUMBER": invalid identifier
> ...
> {code}
> Further, there is an emergency closing the connection
> {code}
> 2014-12-08 01:04:20,227 | TRACE | l Console Thread | TransactionCachingInterceptor | nd.TransactionCachingInterceptor 117 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | destroying connection for tx caching interceptor org.apache.geronimo.connector.outbound.TransactionCachingInterceptor@c4b525e handle: nullManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe]
> 2014-12-08 01:04:20,227 | TRACE | l Console Thread | TransactionEnlistingInterceptor | .TransactionEnlistingInterceptor 96 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | Delisting connection handle: nullManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe] with XAResource org.apache.geronimo.connector.outbound.LocalXAResource@58abcff3 in transaction: org.apache.geronimo.transaction.manager.TransactionImpl@76d51962
> java.lang.Exception: stack trace
> at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.returnConnection(TransactionEnlistingInterceptor.java:96)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.returnConnection(TransactionCachingInterceptor.java:119)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.returnConnection(ConnectionHandleInterceptor.java:71)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.connector.outbound.TCCLInterceptor.returnConnection(TCCLInterceptor.java:50)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.returnConnection(ConnectionTrackingInterceptor.java:91)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener.connectionErrorOccurred(GeronimoConnectionEventListener.java:95)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.tranql.connector.AbstractManagedConnection.unfilteredConnectionError(AbstractManagedConnection.java:126)[133:org.apache.aries.transaction.jdbc:2.1.0]
> at org.tranql.connector.AbstractManagedConnection.connectionError(AbstractManagedConnection.java:115)[133:org.apache.aries.transaction.jdbc:2.1.0]
> at org.tranql.connector.jdbc.ConnectionHandle.connectionError(ConnectionHandle.java:112)[133:org.apache.aries.transaction.jdbc:2.1.0]
> at org.tranql.connector.jdbc.PreparedStatementHandle.execute(PreparedStatementHandle.java:179)[133:org.apache.aries.transaction.jdbc:2.1.0]
> ...
> 2014-12-08 01:04:20,230 | TRACE | l Console Thread | tSinglePoolConnectionInterceptor | tSinglePoolConnectionInterceptor 106 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | returning connection null for MCI ManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe] and MC org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe to pool org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor@1a51706c
> 2014-12-08 01:04:20,230 | INFO | l Console Thread | SinglePoolConnectionInterceptor | .SinglePoolConnectionInterceptor 146 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | Removing ManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe] from pool org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor@1a51706c
> 2014-12-08 01:04:20,231 | TRACE | l Console Thread | tSinglePoolConnectionInterceptor | tSinglePoolConnectionInterceptor 183 | 135 - org.apache.geronimo.components.geronimo-connector - 3.1.1 | Discarding connection in pool org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor@1a51706c handle: nullManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@5fc3d460. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@31ac1bbe]
> {code}
> Further, there is rolled back. The system tries again to close the connection.
> {code}
> 2014-12-08 01:04:20,246 | ERROR | l Console Thread | RollbackTask | transaction.manager.RollbackTask 68 | 69 - org.apache.aries.transaction.manager - 1.1.0 | Unexpected exception committing org.apache.geronimo.connector.outbound.LocalXAResource@58abcff3; continuing to commit other RMs
> javax.transaction.xa.XAException
> at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:88)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at org.apache.geronimo.transaction.manager.RollbackTask.run(RollbackTask.java:64)[69:org.apache.aries.transaction.manager:1.1.0]
> at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:599)[69:org.apache.aries.transaction.manager:1.1.0]
> at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:498)[69:org.apache.aries.transaction.manager:1.1.0]
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)[69:org.apache.aries.transaction.manager:1.1.0]
> at myapp.impl.commands.ImportDoc.doExecute(ImportDoc.java:165)[141:documents-reload:2.2.0.SNAPSHOT]
> at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[16:org.apache.karaf.shell.console:2.3.8]
> at org.apache.karaf.shell.console.jline.Console.run(Console.java:184)[16:org.apache.karaf.shell.console:2.3.8]
> at java.lang.Thread.run(Thread.java:745)[:1.7.0_72]
> Caused by: javax.resource.spi.LocalTransactionException: Unable to rollback
> at org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:113)[133:org.apache.aries.transaction.jdbc:2.1.0]
> at org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback(AbstractManagedConnection.java:203)[133:org.apache.aries.transaction.jdbc:2.1.0]
> at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)[135:org.apache.geronimo.components.geronimo-connector:3.1.1]
> ... 16 more
> Caused by: java.sql.SQLException: Closed Connection
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)[132:wrap_mvn_com.oracle_ojdbc14_10.2.0.5:0]
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147)[132:wrap_mvn_com.oracle_ojdbc14_10.2.0.5:0]
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209)[132:wrap_mvn_com.oracle_ojdbc14_10.2.0.5:0]
> at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1195)[132:wrap_mvn_com.oracle_ojdbc14_10.2.0.5:0]
> at oracle.jdbc.OracleConnectionWrapper.rollback(OracleConnectionWrapper.java:122)[132:wrap_mvn_com.oracle_ojdbc14_10.2.0.5:0]
> at org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:111)[133:org.apache.aries.transaction.jdbc:2.1.0]
> ... 18 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)