You are using different version of camel-http and camel-core together.
Can you check why the camel-http-2.4.0 is used with camel-core-2.9.0 ?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Thursday, December 20, 2012 at 7:23 PM, Meriem wrote:

> hi,
> to continue with the previous topic "Problem Apache Camel with JSP/Tomcat
> application", I replaced the servlet endpoint by the http endpoint to pull
> the request from google as you told me Jiang, but it did not work. This is
> my code:
> from("http://www.google.com";).process(new Processor() {
> public void process(Exchange e) {
> String body =
> e.getOut().getBody(String.class);
> System.out.print(body);
>  
> try {
> PrintWriter ecri = new
> PrintWriter(new FileWriter("C:/output/res.xml"));
> ecri.print(body);
> ecri.flush();
> ecri.close();
> } catch (IOException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> }
>  
> }
> });  
>  
> But I had the following error:
> http://www.google.com] DefaultScheduledPollConsumer WARN Consumer
> Consumer[http://www.google.com] failed polling endpoint:
> Endpoint[http://www.google.com]. Will try again at next poll. *Caused by:
> [java.lang.NoSuchMethodError -
> org.apache.camel.util.IOHelper.close*(Ljava/io/Closeable;Ljava/lang/String;Lorg/apache/commons/logging/Log;)V]
> java.lang.NoSuchMethodError:
> org.apache.camel.util.IOHelper.close(Ljava/io/Closeable;Ljava/lang/String;Lorg/apache/commons/logging/Log;)V
> at
> org.apache.camel.component.http.HttpPollingConsumer.doReceive(HttpPollingConsumer.java:79)[camel-http-2.4.0.jar:2.4.0]
> at
> org.apache.camel.component.http.HttpPollingConsumer.receiveNoWait(HttpPollingConsumer.java:58)[camel-http-2.4.0.jar:2.4.0]
> at
> org.apache.camel.impl.DefaultScheduledPollConsumer.poll(DefaultScheduledPollConsumer.java:48)[camel-core-2.9.0.fuse-70-097.jar:2.9.0.fuse-70-097]
> at
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)[camel-core-2.9.0.fuse-70-097.jar:2.9.0.fuse-70-097]
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[camel-core-2.9.0.fuse-70-097.jar:2.9.0.fuse-70-097]
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
> Source)[:1.6.0_31]
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
> Source)[:1.6.0_31]
> at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.6.0_31]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
> Source)[:1.6.0_31]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
> Source)[:1.6.0_31]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
> Source)[:1.6.0_31]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)[:1.6.0_31]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)[:1.6.0_31]
> at java.lang.Thread.run(Unknown Source)[:1.6.0_31]
>  
> Even though I cheked that I have the org.apache.camel.util.IOHelper class in
> the camel-core package.
> Thanks again for your time and your help.
> Best,
> Meriem.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Problem-with-HTTP-endpoint-tp5724441.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to