apache-camel

java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory)

杀马特。学长 韩版系。学妹 提交于 2019-12-10 02:24:44
问题 I am trying to create a fixedfile reader using Apache Camel Bindy but am getting exception.Please help me to find the solution.Without header and footer which is working well. Update: File is small to understand now and public is added File Content: 101-08-2009 30A9 20A9 60A9 40A9 10A9 50A8 9000000002 New Exception: java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory), line: 2 at org.apache.camel.dataformat.bindy.BindyFixedLengthFactory.bind

Can I have multiple bindy annotated classes in a package and still unmarshal CSVs in Camel?

青春壹個敷衍的年華 提交于 2019-12-09 23:45:58
问题 I would like to have a package like my.company.bindy with several classes in it all annotated with Bindy annotations. Then I'd like to have Camel routes that can unmarshal CSV into one of these types. I've got it all working, but unmarshalling fails if I have more than one bindy annotated class in the package. This because Bindy is trying to unmarshal the CSV line into every class in the package. And a particular line won't properly marshal into more than one of the classes. My dataformat is

Does camel create a thread for each route

时光毁灭记忆、已成空白 提交于 2019-12-09 16:15:47
问题 Recently i have started using camel and i see that it potentially addresses a lot of my integration layer needs. I have created a java client application (not running in any container) where i defined two routes: route1: move a file from an incoming folder1 to folder2 route2: move file content from folderx to mq queue. I start my application and these routes are doing their job polling those folders and routing messages accordingly. Can anyone explain me how the routes work. Does camel

Camel route-testing using adviceWith with OnException definitions

拈花ヽ惹草 提交于 2019-12-09 11:34:53
问题 I have a very simple Camel route definition which just includes some OnException predicates to handle respective exceptions and some log-statements. from("hazelcast:seda:someQueue") .id("someQueueID") .onException(CustomException.class) .handled(true) .log(LoggingLevel.WARN, "custom exception noticed") .end() .onException(IOException.class, FileNotFoundException.class) .asyncDelayedRedelivery() .redeliveryDelay(3*1000*60) // 3 Minutes .maximumRedeliveries(3) .log(LoggingLevel.WARN, "io

How to OSGIfy a library

笑着哭i 提交于 2019-12-09 11:24:39
问题 I'm working on a project, it's integration project, we are using Apache Camel and Apache Karaf. In the project, I need to use the Jira REST Java client library. So I've read quite a lot of various articles and threads about how to wrap non-OSGI library to OSGI bundle, but I'm really not sure if I got it right. So, I've created a POM file with a dependency to the needed library. Made a package and tried to deploy it to Karaf, of course, Karaf complained for missing packages. So, I've found

How to dump HTTP body and headers sent with HTTP component with Apache Camel

假装没事ソ 提交于 2019-12-08 20:58:36
问题 How to dump HTTP body and headers sent with Apache Camel HTTP component using this route: from('direct:abc'). setHeader(Exchange.HTTP_URI, constant("${config.gnutch.solr.coreUrl}/select")). setHeader(Exchange.HTTP_QUERY, constant("q=${q}&wt=xml")). setHeader(Exchange.CONTENT_TYPE, constant('application/xml')). setHeader(Exchange.HTTP_METHOD, constant('GET')). setBody(constant(null)). to("http://null") This is Camel DSL code in groovy. Is that possible? 回答1: Have you tried something like from(

What is CrashLoopBackOff status for openshift pods?

被刻印的时光 ゝ 提交于 2019-12-08 18:48:33
问题 There is more than one example where I have seen this status from a pod running in openshift origin. In this case it was the quickstart for the cdi camel example. I was able to successfully build and run it locally (non - openshift) but when I try to deploy on my local openshift (using mvn -Pf8-local-deploy ), I get this output for that particular example (snipped for relevance) :- [vagrant@vagrant camel]$ oc get pods NAME READY STATUS RESTARTS AGE cdi-camel-z4czs 0/1 CrashLoopBackOff 4 2m

spring boot + apache camel + mongodb integration issue

天大地大妈咪最大 提交于 2019-12-08 18:33:32
问题 I am new to apache camel, just started. I have a spring boot (MVC) + mongodb project already running fine, when I am trying to integrate it with apache camel I am getting exception on console. As per my understanding on exception spring boot is trying to say that I cannot use default annotaion @Component on camel Route file when I am using @ComponentScan(basePackages="packagePath") anywhere else in the project, since it is a MVC architecture, I have Controller, Service & Repository which I

Camel end vs endChoice - not the usual query

跟風遠走 提交于 2019-12-08 15:53:47
问题 First, yes, I have searched and, yes, I have read the same Apache document every one points to. :-) I think there is a bit of confusion and I think I know an answer, so let me lay out an example of what I thought was correct, follow it with what I think the answer is. Thanks. Oh, and I do know that some of the endChoice() lines are not strictly necessary and that Camel will figure it out, but I like the blocks to be cleanly delineated, unless there is some reason not to use them. .choice()

Apache Camel: can I put multiple statements in the when part of the conditional choice statement?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 15:44:54
问题 I would like to obtain the following kind of routing: HTTP POST message with XML body enters CAMEL I store some of the parameters of the XML body The message is routed to an external endpoint The external endpoint (external server) replies -> at this moment, I would like to check whether the reply from the external endpoint is a HTTP 200 OK containing a XML parameter equal to SUCCESS. -> if so, then I would like to use some of the stored parameters to construct a new HTTP message (method =