Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.9.4, 2.10.2
-
None
-
$ uname -a
Linux pc-nc277 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux$ java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /home/jgr/downloads/apache-maven-3.0.4
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: /home/jgr/downloads/jdk1.7.0_07/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-3-amd64", arch: "amd64", family: "unix"$ uname -a Linux pc-nc277 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux $ java -version java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) $ mvn -version Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100) Maven home: /home/jgr/downloads/apache-maven-3.0.4 Java version: 1.7.0_07, vendor: Oracle Corporation Java home: /home/jgr/downloads/jdk1.7.0_07/jre Default locale: fr_FR, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-3-amd64", arch: "amd64", family: "unix"
-
Unknown
Description
In org.apache.camel.component.aws.sqs.SqsEndpoint.updateQueueAttributes,
if I don't have any configuration, the created SetQueueAttributesRequest contains a null atttribute collection and AWS emit an error.
In 2.10.1, no problem.
Workaround in 2.10.2 : force the create SetQueueAttributesRequest to contain a valid attribute collection by defining a configuration in camel.
For exemple:
from("aws-sqs://"queue"?amazonSQSClient=#amazonSQSClient&delay="pollCycle.getMillis()"&maxMessagesPerPoll=10&deleteAfterRead=false")
-> works on 2.10.1, fail on 2.10.2
if I add an argument to my URI"&defaultVisibilityTimeout=30"
-> works on 2.10.1, works on 2.10.2
Exception :
{{
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route SQS-to-MongoDB-EVENTS: Route[[From[aws-sqs://EVENTS?amazonSQSClient=#amazonSQSClien... because of Failed to resolve endpoint: aws-sqs://EVENTS?amazonSQSClient=%23amazonSQSClient&delay=60000&deleteAfterRead=false&maxMessagesPerPoll=10 due to: The request must contain the parameter Attribute.Name.
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:722) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1789) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1575) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412) ~[camel-core-2.10.2.jar:2.10.2]
at com.netceler.iv5measure.contract.impl.sqs.CamelRoutesLauncher.start(CamelRoutesLauncher.java:55) ~[webapp-0.1.2-SNAPSHOT.jar:0.1.2-SNAPSHOT]
at com.netceler.iv5measure.contract.impl.config.ConfiguredStreamInitializer.startStreams(ConfiguredStreamInitializer.java:39) ~[webapp-0.1.2-SNAPSHOT.jar:0.1.2-SNAPSHOT]
... 58 common frames omitted
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: aws-sqs://EVENTS?amazonSQSClient=%23amazonSQSClient&delay=60000&deleteAfterRead=false&maxMessagesPerPoll=10 due to: The request must contain the parameter Attribute.Name.
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:186) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:851) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171) ~[camel-core-2.10.2.jar:2.10.2]
... 66 common frames omitted
Caused by: com.amazonaws.AmazonServiceException: The request must contain the parameter Attribute.Name.
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:614) ~[aws-java-sdk-1.3.23.jar:na]
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:312) ~[aws-java-sdk-1.3.23.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:165) ~[aws-java-sdk-1.3.23.jar:na]
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:812) ~[aws-java-sdk-1.3.23.jar:na]
at com.amazonaws.services.sqs.AmazonSQSClient.setQueueAttributes(AmazonSQSClient.java:246) ~[aws-java-sdk-1.3.23.jar:na]
at com.netceler.infra.aws.sqs.JMXSQS.setQueueAttributes(JMXSQS.java:108) ~[infra-sqs-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
at com.netceler.infra.aws.sqs.AmazonSQSClientProxy.setQueueAttributes(AmazonSQSClientProxy.java:63) ~[infra-sqs-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
at org.apache.camel.component.aws.sqs.SqsEndpoint.updateQueueAttributes(SqsEndpoint.java:139) ~[camel-aws-2.10.2.jar:2.10.2]
at org.apache.camel.component.aws.sqs.SqsEndpoint.doStart(SqsEndpoint.java:93) ~[camel-aws-2.10.2.jar:2.10.2]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:931) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:892) ~[camel-core-2.10.2.jar:2.10.2]
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:475) ~[camel-core-2.10.2.jar:2.10.2]
... 74 common frames omitted
}}