camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Issue with Camel-aws (SQS) and aws-java-sdk-1.4.3
Date Fri, 10 May 2013 13:56:42 GMT
Hi

I suggest to use the AWS version that Camel 2.10.4 uses.

On Thu, May 9, 2013 at 3:05 PM, Shauna Harris <shauna@kusala.net> wrote:
> Hi there,
>
> I'm getting an odd error trying to use Amazon SQS with Camel:
>
> java.lang.NoSuchFieldError: timeOffset
>         at
> com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:857)
>         at
> com.amazonaws.services.sqs.AmazonSQSClient.listQueues(AmazonSQSClient.java:617)
>         at
> com.amazonaws.services.sqs.AmazonSQSClient.listQueues(AmazonSQSClient.java:785)
>         at
> org.apache.camel.component.aws.sqs.SqsEndpoint.doStart(SqsEndpoint.java:82)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
>         at
> org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:931)
>         at
> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:892)
>         at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:475)
>
> I'm using the latest aws-java-sdk-1.4.3 and have tried both camel-aws-2.10.4
> and camel-aws-2.11.1-SNAPSHOT
>
> Any help appreciated! Here is my test code:
>
> public class SQSIntegrationTest extends CamelTestSupport {
>
>     protected MockEndpoint resultEndpoint;
>     private CamelContext camelContext;
>
>     @Before
>     public void setUp() throws Exception {
>         super.setUp();
>         resultEndpoint = (MockEndpoint) context.getEndpoint("mock:result");
>     }
>
>     @After
>     public void tearDown() throws Exception {
>         if (camelContext != null)
>             camelContext.stop();
>         super.tearDown();
>     }
>
>     @Override
>     protected CamelContext createCamelContext() throws Exception {
>         super.createCamelContext();
>         camelContext = super.createCamelContext();
>         return camelContext;
>     }
>
>     @Override
>     protected RouteBuilder createRouteBuilder() throws Exception {
>         final String sqsUri =
> String.format("aws-sqs://integ-test-1?amazonSQSEndpoint=%s&accessKey=%s&secretKey=%s",
>                 "http://sqs.eu-west-1.amazonaws.com/",
>                 "somethingValid", "somethingValid");
>
>         return new RouteBuilder() {
>             @Override
>             public void configure() throws Exception {
>                 from("direct:start")
>                         .to(sqsUri);
>                 from(sqsUri).to("mock:result");
>             }
>         };
>     }
>
>     @Test
>     public void sendAndReceiveMessageFromQueue() throws Exception {
>         String expectedBody = "Message";
>         resultEndpoint.expectedBodiesReceived(expectedBody);
>
>         template.sendBody("direct:start", expectedBody);
>         Thread.sleep(1000);
>
>         resultEndpoint.assertIsSatisfied();
>     }
> }
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Issue-with-Camel-aws-SQS-and-aws-java-sdk-1-4-3-tp5732228.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message