apache-camel

How to create an IAM User using apache camel?

北慕城南 提交于 2020-08-20 11:40:08
问题 I have a camel rest api. I was trying to create an IAM User using apache camel framework. The code is like so -> .post("iam-create-user") .route() .process(new Processor(){ @Override public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader("CamelAwsIAMUsername", "new-user"); }) .to("aws2-iam://current-user?accessKey=insert&secretKey=insert&operation=createUser") .endRest(); I am getting this error java.lang.NullPointerException: null . What is the correct way of

Retrieve item from DynamoDB using apache camel

为君一笑 提交于 2020-08-10 20:15:11
问题 I am trying to use the apache camel aws2 DynamoDB component to retrieve an item. In the docs, it is given that we can use an operation getItem in order to achieve this. I wrote a code like so -> .post("dynamodb-get-item") .route() .process(new Processor(){ @Override public void process(Exchange exchange) throws Exception { Map<String, AttributeValue> key = new HashMap(); key.put("LastName", AttributeValue.builder().s("Smith").build()); exchange.getIn().setHeader(Ddb2Constants.KEY, key);

How to scan a dynamodb table using apache camel?

自作多情 提交于 2020-08-10 19:12:23
问题 I have a camel rest api which scans a DynamoDb table. The code is like so -> .post("dynamodb-scan-table") .route() .toD("aws2-ddb://user?accessKey=insert&secretKey=insert&region=us-east-1&operation=Scan") .endRest(); This returns all the items in my table. My problem is how to scan the table based on a certain condition. In the camel docs, it is given that there is a header CamelAwsDdbScanFilter which is of the type Map<String, Condition> needs to be set in order to achieve the solution for

How to scan a dynamodb table using apache camel?

不问归期 提交于 2020-08-10 19:12:15
问题 I have a camel rest api which scans a DynamoDb table. The code is like so -> .post("dynamodb-scan-table") .route() .toD("aws2-ddb://user?accessKey=insert&secretKey=insert&region=us-east-1&operation=Scan") .endRest(); This returns all the items in my table. My problem is how to scan the table based on a certain condition. In the camel docs, it is given that there is a header CamelAwsDdbScanFilter which is of the type Map<String, Condition> needs to be set in order to achieve the solution for

Apache Artemis - logs AMQ212037 connection failure and connection reset by peer [code=GENERIC_EXCEPTION]

强颜欢笑 提交于 2020-08-10 18:56:16
问题 Artemis is configured in HA, with one master and a backup slave in different VM's. The broker.xml configuration uses static discovery options and the acceptors, 61616 supporing all the protocols, and AMQP. The configuration is similar to this link artemis.log (below issue is continuously logged) WARN [org.apache.activemq.artemis.core.client] AMQ212037: Connection failure to <ip-address> has been detected: readAddress(..) failed: Connection reset by peer [code=GENERIC_EXCEPTION] From the logs,

How to put a map as attribute value in DynamoDb using apache camel?

空扰寡人 提交于 2020-08-09 09:24:20
问题 I want to put a map like so "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}} using the PutItem opearation of apache camel. The code would be something like this -> .post("dynamodb-put-item") .route() .process(new Processor(){ @Override public void process(Exchange exchange) throws Exception { Map<String, AttributeValue> key = new HashMap(); key.put("M", AttributeValue.builder().m(//Something needs to be added here).build()); exchange.getIn().setHeader(Ddb2Constants.ITEM, key); exchange.getIn()

BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/<NONE>]

守給你的承諾、 提交于 2020-08-09 08:49:11
问题 I have an Apache Camel v3.3 project that works fine as a stand-alone application but I'm struggling to deploy it to Tomcat. The error I get is: Jul 06, 2020 5:53:49 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener] org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/<NONE>];

Camel SFTP component - SSH private key URI works with privateKeyFile, doesn't work with privateKey

被刻印的时光 ゝ 提交于 2020-08-08 15:44:45
问题 I have a camel route that looks like the next one: from("direct:download") .pollEnrich() .simple("sftp://my.host:22/folder/?username=foo&fileName=${header.CamelFileName} &privateKeyFile=src/main/resources/privateSSHKey") .to("file://state/downloaded"); The file src/main/resources/privateSSHKey is an RSA private key. That works without a problem : JSCH (library used by Camel for the SFTP endpoint) manages to connect and download the desired file. The previous setup is ok while developing,

JBoss Fuse CXF-RS REST Issue - 'No services have been found'

笑着哭i 提交于 2020-08-05 14:14:12
问题 I'm creating a REST Service with Apache Camel and CXF-RS, using the following tutorial: https://www.javainuse.com/camel/apache_camel_rest_cxfrs I've set up the code as shown in the tutorial and followed the steps correctly. After building the Maven project, I have successfully been able to install the bundle on Apache Karaf, using the SNAPSHOT file created. (A new Bundle ID was created). When I run the command to 'start' the newly created bundle, it seemingly works with no errors being shown.

JBoss Fuse CXF-RS REST Issue - 'No services have been found'

旧城冷巷雨未停 提交于 2020-08-05 14:08:33
问题 I'm creating a REST Service with Apache Camel and CXF-RS, using the following tutorial: https://www.javainuse.com/camel/apache_camel_rest_cxfrs I've set up the code as shown in the tutorial and followed the steps correctly. After building the Maven project, I have successfully been able to install the bundle on Apache Karaf, using the SNAPSHOT file created. (A new Bundle ID was created). When I run the command to 'start' the newly created bundle, it seemingly works with no errors being shown.