You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2012/11/21 21:01:58 UTC

[jira] [Resolved] (SMX4-1285) Activiti camel Test failed Order process lookup.

     [ https://issues.apache.org/jira/browse/SMX4-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen resolved SMX4-1285.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.5.0
         Assignee: Gert Vanthienen

Fixed in https://svn.apache.org/viewvc?view=revision&revision=1412255

Thanks to Filippo for reporting the issue and coming up with the initial solution!
                
> Activiti camel Test failed Order process lookup.
> ------------------------------------------------
>
>                 Key: SMX4-1285
>                 URL: https://issues.apache.org/jira/browse/SMX4-1285
>             Project: ServiceMix 4
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 4.5.0
>            Reporter: filippo balicchia
>            Assignee: Gert Vanthienen
>            Priority: Minor
>             Fix For: 4.5.0
>
>         Attachments: patchResultLog.txt, SMX4-1285.patch.txt
>
>
> After upgrade to activiti 5.10 camelactiviti example stop to work cause fail to lookup "orderProcess".
> the Root cause was:
> Rolling back JDBC Connection.
> {noformat}
> 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]
> {noformat}
> in mybatis 3.1.1 there is a check and activiti 5.10 set by default to false:
> {code}
>   if (connection != null && !connection.getAutoCommit()) {
>       if (log.isDebugEnabled()) {
>         log.debug("Rolling back JDBC Connection [" + connection + "]");
>       }
>       connection.rollback();
>     }
> {code}
> The first fix that I thought is to put this in  activiti-config.xml:
> {noformat}
> +    <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>
> {noformat}
> But when try to start feature servicemix tell me
> {noformat}
> 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]
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira