骆驼不承认?锁= false作为有效 [英] Camel not recognizing ?lock=false as valid

查看:365
本文介绍了骆驼不承认?锁= false作为有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个骆驼的路线从文件中读取和路线结束后,所以我希望把锁关闭它不删除.CamelLock文件。对于骆驼文件的文件说,该属性是锁定然而,当我这样做<从URI =文件:///数据/中/锁= 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:

这是造成失败
  解决端点:文件:///数据/中/锁= FALSE由于:未能
  解决端点:文件:///数据/中/锁= FALSE由于:?有1
  即不能在端点设置的参数。检查URI是否
  参数拼写正确,并且他们的属性
  端点。未知参数= {[锁= 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

推荐答案

骆驼2.x的文件组件文档是在这里:的 http://camel.apache.org/file2
http://camel.apache.org/file
在页面顶部的通知,它说这是骆驼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!

有是默认使用markerFile一个readLock选项(因此为什么你看到那些.camelLock文件)。您可以通过设置readLock选项没有关闭这个功能,如:

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

这篇关于骆驼不承认?锁= false作为有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆