Tips and tricks in Hungarian (not bugs!!!): http://q2a.inf.mit.bme.hu/1466/bonita-tippek-es-trukkok
Bonita Runtme API and Custom Objects
We had a problem using our custom (serializable) objects with the Bonita Runtime API.
Environment:
- Windows 8.1 64bit (Lajos), Windows 8 64bit (Ágnes)
- Bonita Community Edition 6.2.6 64 bit
- latest Oracle Java JDK 1.7 64bit (16/05/2014)
Description: the Runtime API worked well from Java until we started to use custom objects. Bonita throw an error about it could not deserialize/parse the object. We had the same binaries in our project and in Bonita and also used the corresponding maven dependency (version 6.2.6).
Detailed exception trace:
ápr. 16, 2014 8:31:53 DU org.bonitasoft.console.server.listener.StudioWatchdogListener$1 run
WARNING: Bonita Studio watchdog process has started on 6969 with a delay of 20000ms
ápr. 16, 2014 8:33:10 DU org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
WARNING: Work ExecuteFlowNodeWork: processInstanceId:1002, flowNodeInstanceId: 20009 failed. The failure will be handled.
ápr. 16, 2014 8:33:10 DU org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
WARNING: Exception was:org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeExecutionException: org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.stepForward(FlowNodeExecutorImpl.java:181)
at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeFlowNode(FlowNodeExecutorImpl.java:294)
at org.bonitasoft.engine.execution.work.ExecuteFlowNodeWork.work(ExecuteFlowNodeWork.java:76)
at org.bonitasoft.engine.execution.work.TxBonitaWork$1.call(TxBonitaWork.java:48)
at org.bonitasoft.engine.execution.work.TxBonitaWork$1.call(TxBonitaWork.java:44)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:241)
at org.bonitasoft.engine.execution.work.TxBonitaWork.work(TxBonitaWork.java:53)
at org.bonitasoft.engine.execution.work.LockProcessInstanceWork.work(LockProcessInstanceWork.java:76)
at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:72)
at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:45)
at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
at org.bonitasoft.engine.execution.StateBehaviors.handleCallActivity(StateBehaviors.java:541)
at org.bonitasoft.engine.execution.state.InitializingActivityWithBoundaryEventsStateImpl.onEnterToOnFinish(InitializingActivityWithBoundaryEventsStateImpl.java:97)
at org.bonitasoft.engine.execution.state.FlowNodeStateWithConnectors.execute(FlowNodeStateWithConnectors.java:73)
at org.bonitasoft.engine.execution.state.FlowNodeStateWithConnectors.execute(FlowNodeStateWithConnectors.java:35)
at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeState(FlowNodeExecutorImpl.java:123)
at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.stepForward(FlowNodeExecutorImpl.java:169)
... 16 more
Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:935)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:892)
at org.bonitasoft.engine.execution.StateBehaviors.instantiateProcess(StateBehaviors.java:565)
at org.bonitasoft.engine.execution.StateBehaviors.handleCallActivity(StateBehaviors.java:536)
... 21 more
Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initialize(ProcessExecutorImpl.java:591)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:924)
... 24 more
Caused by: org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator$1: Trying to set variable "chosenConfiguration" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory
at org.bonitasoft.engine.bpm.model.impl.BPMInstancesCreator.createDataInstances(BPMInstancesCreator.java:559)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initialize(ProcessExecutorImpl.java:574)
... 25 more
Ágnes Barta, Lajos Cseppentő, Noémi Szilvásy