Description
After upgrade to activiti 5.10 camelactiviti example stop to work cause fail to lookup "orderProcess".
the Root cause was:
Rolling back JDBC Connection.
09:49:00,976 | DEBUG | l Console Thread | JdbcTransaction | 188 - org.mybatis.mybatis - 3.1.1 | Setting autocommit to false on JDBC Connection [conn3: url=jdbc:h2:file:/projects/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full/target/apache-servicemix-4.5.0-SNAPSHOT/data/activiti/database user=SA] 09:49:00,977 | DEBUG | l Console Thread | selectDeploymentsByName | 188 - org.mybatis.mybatis - 3.1.1 | ooo Using Connection [conn3: url=jdbc:h2:file:/projects/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full 09:49:01,059 | DEBUG | l Console Thread | JdbcTransaction | 188 - org.mybatis.mybatis - 3.1.1 | Rolling back JDBC Connection [conn3: url=jdbc:h2:file:/projects/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full/target/apache-servicemix-4.5.0-SNAPSHOT/data/activiti/database user=SA] 09:49:01,060 | DEBUG | l Console Thread | JdbcTransaction | 188 - org.mybatis.mybatis - 3.1.1 | Resetting autocommit to true on JDBC Connection [conn3: url=jdbc:h2:file:/projects/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full/target/apache-servicemix-4.5.0-SNAPSHOT/data/activiti/database user=SA]
in mybatis 3.1.1 there is a check and activiti 5.10 set by default to false:
if (connection != null && !connection.getAutoCommit()) { if (log.isDebugEnabled()) { log.debug("Rolling back JDBC Connection [" + connection + "]"); } connection.rollback(); }
The first fix that I thought is to put this in activiti-config.xml:
+ <bean id="jdbcTransactionFactory" class="org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory"/> + + <bean id="transactionFactory" factory-ref="jdbcTransactionFactory" factory-method="newTransaction"> + <argument ref="dataSource"/> + <argument> + <null/> + </argument> + <argument value="true"/> + </bean> + <bean id="configuration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration" ext:field-injection="true"> <property name="databaseType" value="h2"/> <property name="dataSource" ref="dataSource"/> <property name="transactionManager" ref="transactionManager"/> + <property name="transactionFactory" ref="transactionFactory"/> <property name="databaseSchemaUpdate" value="true"/> </bean>
But when try to start feature servicemix tell me
3:00:46,610 | ERROR | rint Extender: 1 | BlueprintContainerImpl| 10 - org.apache.aries.blueprint - 0.3.2 | Unable to start blueprint container for bundle org.apache.servicemix.activiti.configorg.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: org.apache.aries.blueprint.utils.ReflectionUtils$JointPropertyDescriptor@4c8d74b Caused by: java.lang.Exception: Unable to convert value org.apache.ibatis.transaction.jdbc.JdbcTransaction@612bd56c to type org.apache.ibatis.transaction.TransactionFactory at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:172)[10:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintRepository.convert(BlueprintRepository.java:373)[10:org.apache.aries.blueprint:0.3.2]
But JdbcTransactionFactory implements TransactionFactory.
I think that this problem can be amenable to
https://issues.apache.org/jira/browse/ARIES-834
At the moment IMHO the best solution I've found that works is
WA localized in activity.
Attachments
Attachments
Issue Links
- is required by
-
SMX4-1274 upgrade to activiti 5.10
- Resolved