Questions tagged [bindy]

Bindy is a component for Apache-Camel for parsing/binding non-structured data (e.g. CSV records) to/from Java Beans.

Bindy is a component for for parsing/binding non-structured data to/from Java Beans.

It has a support for:

  • CSV records
  • Fixed-length records,
  • FIX messages,
  • or almost any other non-structured data

Bindy evaluates the annotations in the used Java Beans to determine the record structure and to perform the parsing/binding between the data records and the Beans.

99 questions
0
votes
2 answers

How to replace pipe with |" in apache camel

I am trying to unmarshal json payload and write all the records with header and footer in text file. All records have | delimitter including header and footer. I would like to replace | with |"(pipe + quote). I am getting below exception in the…
Sri
  • 51
  • 1
  • 7
0
votes
1 answer

Unable to add header and footer to the file using Apache Camel Bindy

I am trying to create a file with header and footer record along with json payload as body. Header and footer property values will be dynamic based on the timestamp and total number of records (At the moment I am planning to achieve with static…
Sri
  • 51
  • 1
  • 7
0
votes
1 answer

Converting CSV file to Java Objects (POJO) and send it to ActiveMQ queue

My aim is to read the csv file, convert it to Java Objects (POJO) and send the Java Objects one by one to ActiveMQ queue. Below is the code: public void configure() throws Exception { from("file:src/main/resources?fileName=data.csv") …
sidd
  • 195
  • 3
  • 20
0
votes
1 answer

How to enrich the csv content data with additional fields and convert into text file with pipe as delimiter using apache camel

I have a csv file with input content separated with comma ",". I want to convert that into text file with "|" delimiter. I'm using apache camel CsvDataFormat to convert the given csv data format.I can be able to convert the csv content to pipe…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

Apache Camel Bindy: Unexpected / unmapped characters found at the end of the fixed-length record at line : 2

Getting following exception in Camel: Exchange[ Id ID-Dell-PC-51429-1581618665098-0-4 ExchangePattern InOnly Headers {breadcrumbId=ID-Dell-PC-51429-1581618665098-0-3, CamelFileAbsolute=false,…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
1 answer

Camel - Enrich CSV from FTP with CSV from local disk using Camel Bindy

The goal is to produce a report every hour by comparing two CSV files with use of Camel 3.0.0. One is located on a FTP server, the other on disk. How to use poll enrich pattern in combination with unmarshalling the CSV on disk with Bindy…
Bart Weber
  • 1,136
  • 4
  • 15
  • 32
0
votes
1 answer

How to add another xml tag based on the content size using apache camel

Problem Statement: I have flat file as input source which contains the text at first position of length varies from (0 - 80). If the length of the text is less than 40, I have to create one xml tag. If its greater than 40 I have to split it and…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

Need to convert String to Float variable using Camel-Bindy Format

A test file with delimited Data and one of the field is amount and it arrives as a string. To be converted to float. As per camel-bindy i tried a way, but ended with same value without precesions. Input : 12345678 @DataField(name="AMT", trim=true,…
0
votes
0 answers

Camel bindy throwing null pointer exception when i use same positioned value multiple times

I'm using two DataFields with same positions for two different attributes. It is throwing null pointer exception.Can anyone help me how to make it work. * CamelRoute.java* public class ConverterRoute implements RoutesBuilder { private static…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
2 answers

How to handle Underscores in xml tags

How to handle the underscores in xml tags. Here is the code which I'm working. It was generating me the xml tag with double underscores ("__") instead of single underscore ("_"). Can anyone help me to overcome this issue. ConverterRoute.Java public…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

How to define custom namespace and tag alias using camel-xstream

I'm trying to transform the pipe delimited string to xml, which is working fine. But, I'm not getting the actual output which I have shown below. In my output the parent tag is generating along with the package name, also its not generating the…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

How to transform individual record in flat file to one xml using apache camel instead of list of xml records

CamelConfig.java @Component public class CamelConfig extends RouteBuilder { @Override public void configure() throws Exception { try { CamelContext context = new DefaultCamelContext(); ConverterRoute route =…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

How to generate custom tag names and namespaces in xml using apache camel

I'm trying to transform pipe delimited string data to xml using camel bindy. But it is generating the tags along with the class name. Also I would like to add namespace to my tags. I tried to use Camel process to generate custom tag, it's not…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
0 answers

Exception while transforming Csv to Pojo using apache camel 2.24.1

I'm trying to convert Csv data to Pojo using Apache Camel 2.24.1, but it is throwing exception.Can anyone help me to solve this issue. CsvToPojoRoute.java public class CsvToPojoRoute extends RouteBuilder { public void configure() throws…
TechGeek
  • 480
  • 1
  • 8
  • 22
0
votes
1 answer

Creating a POJO from CSV where a field is an Enum

I'm using Bindy to create a Pojo from the following CSV file where side is an Enum: orderId,symbol,side,price,quantity 1, MSFT, SELL, 19, 8 2, MSFT, SELL, 20, 4 3, MSFT, BUY, 16, 16 public enum Side { BUY, SELL } Here is my Camel route: …
gsdev
  • 259
  • 4
  • 14