apache-camel

Error loading Jar file with Tomcat 7, Spring 3 and Camel 2.9.1

拈花ヽ惹草 提交于 2019-12-12 00:54:54
问题 I'm getting the following exception while running Camel (2.9.1) on Tomcat (apache-tomcat-7.0.26) with Spring (3.0.5.RELEASE). Any pointers would be appreciated. Thanks. Mar 12, 2012 3:03:48 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/Users/XXXX/Documents/apache-tomcat-7.0.26/webapps/myapp/WEB-INF/lib/geronimo-servlet_2.5_spec-1.1.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class [ http-bio-8080

Camel-FTP only run once?

混江龙づ霸主 提交于 2019-12-12 00:42:54
问题 I can't seem to get the camel-ftp component to die when no files are found. I added a LimitedPollingConsumerPollStrategy with a limit of 1 : <bean id="noPoll" class="org.apache.camel.impl.LimitedPollingConsumerPollStrategy"> <property name="limit" value="1"/> </bean> and configured the URI to use it: ftp://user@host.ftp/?password=pass&stepwise=false&binary=true&delete=false&noop=true&pollStrategy=#noPoll It still just hangs, looking for files, when it doesn't find any.. so I added

Developing Apache camel application & run on Karaf

前提是你 提交于 2019-12-11 23:36:44
问题 I am developing an integration application and planned to use apache camel. After doing initial study I found that there are various ways to develop apache camel application(Indeed, this is a library and can be associated with any java application) like spring boot, spring and plain java & routes can be defined in DSL or xml file. I have created one application using spring libraries and working fine on my local eclipse when I run it as a java program. Now,as I want to run same in osgi

camel substring operation- n characters from end of message body

雨燕双飞 提交于 2019-12-11 23:16:06
问题 This will probably be a layup for most of you, so I apologize in advance. I am using Apache camel with spring DSL. My message body has been converted to a string. I want everything from the 9th to 998th character, preferably using a simple expression. I have tried <transform> <simple>${body.substring(8,${body.length}-1)}</simple> </transform> but Camel doesn't recognize the subtraction. As such, it will try to convert the string "1045-2" to an integer, and obviously fail. Is there a

Using Camel to stream output from a POST to a URL

◇◆丶佛笑我妖孽 提交于 2019-12-11 22:46:30
问题 Is it possible to use the Camel Stream Component to read output of a POST to a URL? Something like: <to uri="stream:url?url=http://localhost:8080/mycontext/myservlet"/> I tried this but it did not work. I need to post a JSON object to a URL and process a huge payload being returned, so I need it to be streamed to a file without loading it all in memory first. Are there alternatives in the CAMEL DSLs or should I be using a bean somehow, e.g. using a HttpUrlConnection, to do the streaming? 回答1:

Perform wireTap using apache camel

十年热恋 提交于 2019-12-11 22:12:25
问题 I need to do wireTap using camel. Below is the piece of code I have written from("jetty:http://xyz:8080?enableMultipartFilter=false") .streamCaching() .wireTap("direct:tap").copy(true).process(new WireTapProcessor()).end() .process(new RequestProcessor()) .to("file:Z:/Testing/input"); When executing above code, it gives me exception that NoDirectConsumersAvailable. Could you please suggest how to perform wireTap in above scenario 回答1: Well you send the Wire Tap to a direct consumer but you

Apache Camel Intercept - Capture Output.

白昼怎懂夜的黑 提交于 2019-12-11 21:24:30
问题 I am attempting to use Apache Camel Interceptor in the spring.xml file to capture incoming requests and outgoing responses, like this: <bean id="InterceptProcessor" class="CaptureProcessor"/> <camel:camelContext id="camel"> <camel:jmxAgent id="agent" disabled="true" /> <camel:intercept> <camel:process ref="InterceptProcessor"></camel:process> </camel:intercept> <camel:route id="Resource.rConnect.rconnect" autoStartup="false"> <camel:from uri="cxfjetty:${Resource.rConnect.rconnect.baseUrl}

Mockito Spring Camel @Autowire fail

谁说胖子不能爱 提交于 2019-12-11 21:22:00
问题 I'm trying to unit test a camel route. The route under test extends a custom abstract RouteBuilder (I know about favouring composition over inheritance - this is maintenance code). I've set up my test as @Roman Vottner did over here. Everything works (is initialized) until I hit the first abstract class up the hierarchy. It has an @Autowired class which wasn't initialized (is null) even though it was mocked and @Autowired when the test started. Any ideas on how to solve my injection problem?

Apache Camel inOut routes, out exchange marshaling/unmarshaling with jaxb

﹥>﹥吖頭↗ 提交于 2019-12-11 20:44:38
问题 we have this apache camel route, from(commandDrop).marshal(jaxbDataFormat).to(jmsQueue); from(jmsQueue).inOut("jms:doCommand?requestTimeout=500000"); from("jms:doCommand").unmarshal(jaxbDataFormat).beanRef("bean"); .... and a bean class like this class BeanClass { public void doCommand(Command command, Exchange exchange){ { command.run(); exchange.getOut().setBody(command); } } we trying to put a message and wait for a reply on the route like this Object ret = template.requestBody(commandDrop

is there a generic Map strategy for Apache Camel's Bindy format?

十年热恋 提交于 2019-12-11 20:12:37
问题 Is there a builtin or standard strategy for Apache Camel's Bindy data format to marshal to/from java.util.Map s? From what I can tell, the strategy can only be annotated into POJOs such that certain Bean properties map to/from CSV fields. Camel's CSV data format supports marshaling to/from Map s (whose keys correspond with CSV headers and values correspond with CSV fields). Unfortunately, it depends on Apache Commons CSV, which is still incubating and not yet active and mature enough to be