Hi everyone,
I’m trying to run a simple process that search a businessData object with a request like this:
Operation : searchResult [BusinessData] take the value of MyBusinessData.findByPersistanceId
The request of MyBusinessData.findByPersistanceId is :
SELECT c
FROM cDocument c
WHERE c.persistenceId= :persistenceId
When i’m running this process, I’ve got this error:
2018-06-26 11:20:03.156 +0200 GRAVE: org.bonitasoft.engine.execution.work.InSessionBonitaWork THREAD_ID=312 | HOSTNAME=LAPTOP-M0D8QS32 | TENANT_ID=1 | The work [ExecuteFlowNodeWork: flowNodeInstanceId: 60012] failed. The failure will be handled.
2018-06-26 11:20:03.173 +0200 GRAVE: org.bonitasoft.engine.execution.work.InSessionBonitaWork THREAD_ID=312 | HOSTNAME=LAPTOP-M0D8QS32 | TENANT_ID=1 | org.bonitasoft.engine.transaction.STransactionCommitException : "PROCESS_DEFINITION_ID=8558190567453284743 | PROCESS_NAME=DocushareUpload | PROCESS_VERSION=3.0 | PROCESS_INSTANCE_ID=3004 | ROOT_PROCESS_INSTANCE_ID=3004 | FLOW_NODE_DEFINITION_ID=8996605863777719563 | FLOW_NODE_INSTANCE_ID=60012 | FLOW_NODE_NAME=Creation cDocument | bitronix.tm.internal.BitronixRollbackException: transaction failed to prepare: a Bitronix Transaction with GTRID [626F6E6974612D746F6D6361742D62746D2D6E6F6465300000000014CD3BD7000000E2], status=ROLLEDBACK, 2 resource(s) enlisted (started Mon Jan 05 01:56:34 CET 1970)"
org.bonitasoft.engine.transaction.STransactionCommitException: PROCESS_DEFINITION_ID=8558190567453284743 | PROCESS_NAME=DocushareUpload | PROCESS_VERSION=3.0 | PROCESS_INSTANCE_ID=3004 | ROOT_PROCESS_INSTANCE_ID=3004 | FLOW_NODE_DEFINITION_ID=8996605863777719563 | FLOW_NODE_INSTANCE_ID=60012 | FLOW_NODE_NAME=Creation cDocument | bitronix.tm.internal.BitronixRollbackException: transaction failed to prepare: a Bitronix Transaction with GTRID [626F6E6974612D746F6D6361742D62746D2D6E6F6465300000000014CD3BD7000000E2], status=ROLLEDBACK, 2 resource(s) enlisted (started Mon Jan 05 01:56:34 CET 1970)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.complete(JTATransactionServiceImpl.java:180)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:284)
at org.bonitasoft.engine.execution.work.TxBonitaWork.work(TxBonitaWork.java:53)
at org.bonitasoft.engine.execution.work.LockProcessInstanceWork.work(LockProcessInstanceWork.java:74)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.InSessionBonitaWork.work(InSessionBonitaWork.java:58)
at org.bonitasoft.engine.work.BonitaThreadPoolExecutor.lambda$submit$0(BonitaThreadPoolExecutor.java:90)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: bitronix.tm.internal.BitronixRollbackException: transaction failed to prepare: a Bitronix Transaction with GTRID [626F6E6974612D746F6D6361742D62746D2D6E6F6465300000000014CD3BD7000000E2], status=ROLLEDBACK, 2 resource(s) enlisted (started Mon Jan 05 01:56:34 CET 1970)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:283)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.complete(JTATransactionServiceImpl.java:176)
... 11 more
Caused by: bitronix.tm.internal.BitronixRollbackException: transaction failed during prepare of a Bitronix Transaction with GTRID [626F6E6974612D746F6D6361742D62746D2D6E6F6465300000000014CD3BD7000000E2], status=PREPARING, 2 resource(s) enlisted (started Mon Jan 05 01:56:34 CET 1970): resource(s) [jdbc/bonitaDSXA, jdbc/BusinessDataDSXA] threw unexpected exception
at bitronix.tm.twopc.Preparer.throwException(Preparer.java:130)
at bitronix.tm.twopc.Preparer.prepare(Preparer.java:91)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:275)
... 13 more
Caused by: bitronix.tm.twopc.PhaseException: collected 2 exception(s):
[jdbc/bonitaDSXA - org.postgresql.xa.PGXAException(XAER_RMERR) - Les serveurs de versions antérieures à 8.1 ne supportent pas le commit à deux phases.]
[jdbc/BusinessDataDSXA - org.postgresql.xa.PGXAException(XAER_RMERR) - Les serveurs de versions antérieures à 8.1 ne supportent pas le commit à deux phases.]
at bitronix.tm.twopc.AbstractPhaseEngine.executePhase(AbstractPhaseEngine.java:104)
at bitronix.tm.twopc.Preparer.prepare(Preparer.java:88)
... 14 more
I have added the ‘max_prepared_transactions = 100’ in the postgresql.conf and set the ‘max_connections’ to 100 too.
When I’m running the command : ‘show max_prepared_transactions;’ in my DB, that’s return ‘100’.
So, my posgres configuration seems like good.
And my postgres version is :
“PostgreSQL 10.4 on x86_64-pc-mingw64, compiled by gcc.exe (Rev5, Built by MSYS2 project) 4.9.2, 64-bit”
Someone can help me to fix this issue?