2 Replies Latest reply on Mar 7, 2017 8:37 AM by hchiorean

    Distributed transaction issue

    zcc39r

      Having WildFly 10.1.0, ModeShape 5.3.0 and a pair of Oracle datasources I'm trying to migrate some data from one datasource (raw Oracle 9i-based JDBC on one server) to JDBC-backed ModeShape repository (Oracle11g on another server). This process is long running, so I run it as JSR-352 batch in order to have a chance to resume it from the last checkpoint when failure occurs. The problem is that when destination become short of space batch runtime cannot catch a corresponding exception:

      2017-02-05 09:21:37,822 WARN  [com.arjuna.ats.jta] (Batch Thread - 1) ARJUNA016029: SynchronizationImple.afterCompletion - failed for SynchronizedTransaction[id='853ef388-a224-42cd-82f7-b38ca5550a18

      '] with exception: org.modeshape.persistence.relational.RelationalProviderException: java.sql.BatchUpdateException: ORA-01653: unable to extend table XT.MODESHAPE_REPOSITORY by 8192 in tablespace XT

              at org.modeshape.persistence.relational.RelationalDb.persistContent(RelationalDb.java:346)

              at org.modeshape.persistence.relational.RelationalDb.runWithConnection(RelationalDb.java:374)

              at org.modeshape.persistence.relational.RelationalDb.txCommitted(RelationalDb.java:306)

              at org.modeshape.jcr.txn.Transactions$SynchronizedTransaction.afterCompletion(Transactions.java:641)

              at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:542)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)

              at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1200)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

              at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)

              at org.jberet.runtime.runner.ChunkRunner.doCheckpoint(ChunkRunner.java:545)

              at org.jberet.runtime.runner.ChunkRunner.readProcessWriteItems(ChunkRunner.java:317)

              at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:201)

              at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:226)

              at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:147)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runJobElement(CompositeExecutionRunner.java:128)

              at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:203)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runJobElement(CompositeExecutionRunner.java:128)

              at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:203)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)

              at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)

              at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)

              at org.wildfly.extension.batch.jberet.impl.BatchEnvironmentService$WildFlyBatchEnvironment$1.run(BatchEnvironmentService.java:243)

              at org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:497)

              at org.jberet.spi.JobExecutor$3.run(JobExecutor.java:161)

              at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)

              at org.jboss.threads.JBossThread.run(JBossThread.java:320)

      Caused by: java.sql.BatchUpdateException: ORA-01653: unable to extend table XT.MODESHAPE_REPOSITORY by 8192 in tablespace XT

       

              at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10500)

              at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:230)

              at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1190)

              at org.modeshape.persistence.relational.DefaultStatements$DefaultBatchUpdate.insert(DefaultStatements.java:290)

              at org.modeshape.persistence.relational.RelationalDb.persistContent(RelationalDb.java:342)

              ... 32 more

       

      2017-02-05 09:21:37,832 WARN  [com.arjuna.ats.arjuna] (Batch Thread - 1) ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffffac1003be:-348ecc76:58943

      ef3:23a408, SynchronizedTransaction[id='853ef388-a224-42cd-82f7-b38ca5550a18'] >

      So there is only a WARN message in the log, batch job is not failing and batch runtime continues to read data from the source and this data considered to be persisted at destination repository while it's not true.

       

      I would be grateful for any advice to resolve this issue. May be something is wrong with my setup and approach.