Camel not recognizing ?lock=false as valid(骆驼不承认 ?lock=false 是有效的)
问题描述
我从文件中读取了骆驼路线,并且在路线完成后它没有删除 .CamelLock 文件,所以我想关闭锁定.Camel-File 的文档说该属性是锁定",但是当我执行 <from uri="file:///data/in/?lock=false"/>
我得到:
I've got a camel route reading from a file and it's not deleting the .CamelLock file after the route finishes so I wanted to turn lock off. The documentation for Camel-File says that the attribute is "lock" yet when I do <from uri="file:///data/in/?lock=false" />
I get:
原因:org.apache.camel.ResolveEndpointFailedException: 失败解决端点:file:///data/in/?lock=false 由于:未能解决端点:file:///data/in/?lock=false 由于:有 1无法在端点上设置的参数.检查uri,如果参数拼写正确并且它们是端点.未知参数=[{lock=false}]
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: file:///data/in/?lock=false due to: Failed to resolve endpoint: file:///data/in/?lock=false due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{lock=false}]
骆驼 2.11.0
推荐答案
Camel 2.x 的文件组件文档在这里:http://camel.apache.org/file2您很可能在以下位置阅读旧的 Camel 1.x 文档:http://camel.apache.org/file注意页面顶部,它说这是针对 Camel 1.x 的!
The file component documentation for Camel 2.x is here: http://camel.apache.org/file2 You most likely read the old Camel 1.x documentation at: http://camel.apache.org/file Notice on the top of the page, it says this is for Camel 1.x!
有一个 readLock 选项,默认情况下使用 markerFile (以及为什么你会看到那些 .camelLock 文件).您可以通过将 readLock 选项设置为 none 来关闭它,例如
There is a readLock option which by default uses markerFile (and hence why you see those .camelLock files). You can turn this off by setting the readLock option to none, eg
readLock=none
这篇关于骆驼不承认 ?lock=false 是有效的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:骆驼不承认 ?lock=false 是有效的


基础教程推荐
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 降序排序:Java Map 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01