[ https://issues.apache.org/jira/browse/CAMEL-11388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059700#comment-16059700 ]
Luca Burgazzoli commented on CAMEL-11388: ----------------------------------------- [~davsclaus] sent a PR against CIA2 (https://github.com/camelinaction/camelinaction2/pull/73) to fix the example. will work on make it easier to configure the policy in a separate JIRA > camel-infinispan - InfinispanRoutePolicy issue with locking from remote server > ------------------------------------------------------------------------------ > > Key: CAMEL-11388 > URL: https://issues.apache.org/jira/browse/CAMEL-11388 > Project: Camel > Issue Type: Bug > Components: camel-infinispan > Affects Versions: 2.19.0 > Reporter: Claus Ibsen > Assignee: Luca Burgazzoli > Fix For: 2.19.2, 2.20.0 > > > It seems there is a problem that the route policy seems to grant locks to > both or keep changing between them, so we have competing consumers being > active at the same time. > The issue can be reproduced by following the readme file from > https://github.com/camelinaction/camelinaction2/tree/master/chapter17/cluster-file-infinispan > You can see errors like > {code} > Caused by: org.apache.camel.RuntimeCamelException: > java.io.FileNotFoundException: > /Users/davsclaus/workspace/camelinaction2/chapter17/cluster-file-infinispan/target/inbox/WebSpherePackageScanClassResolver.java > (No such file or directory) > at > org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1756) > at > org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1355) > at > org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:60) > at > org.apache.camel.component.file.GenericFileConverter.convertTo(GenericFileConverter.java:97) > at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1351) > at > org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:62) > at > org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:346) > at > org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:181) > ... 41 more > Caused by: java.io.FileNotFoundException: > /Users/davsclaus/workspace/camelinaction2/chapter17/cluster-file-infinispan/target/inbox/WebSpherePackageScanClassResolver.java > (No such file or directory) > at java.io.FileInputStream.open0(Native Method) > at java.io.FileInputStream.open(FileInputStream.java:195) > at java.io.FileInputStream.<init>(FileInputStream.java:138) > at > org.apache.camel.converter.IOConverter.toInputStream(IOConverter.java:78) > at > org.apache.camel.converter.IOConverter.toByteArray(IOConverter.java:266) > at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1351) > ... 50 more > 2017-06-09 08:04:41,396 [://target/inbox] WARN GenericFileOnCompletion > - Rollback file strategy: > org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy@160cecbb > for file: GenericFile[WebSpherePackageScanClassResolver.java] > 2017-06-09 08:04:42,126 [spanRoutePolicy] INFO InfinispanRoutePolicy > - Leadership lost (map=myLock, key=myLockKey val=myLockValue) > 2017-06-09 08:04:42,127 [spanRoutePolicy] INFO InfinispanRoutePolicy > - Leadership taken (map=myLock, key=myLockKey, val=myLockValue) > 2017-06-09 08:05:07,710 [29c8fac7da04e40] INFO InfinispanRoutePolicy > - Leadership lost (map=myLock, key=myLockKey val=myLockValue) > 2017-06-09 08:05:07,715 [29c8fac7da04e40] INFO InfinispanRoutePolicy > - Leadership taken (map=myLock, key=myLockKey, val=myLockValue) > {code} > Where as the hazelcast example which is similar works fine. -- This message was sent by Atlassian JIRA (v6.4.14#64029)