Questions tagged [bean-io]

BeanIO is an open source Java framework for marshalling and unmarshalling Java beans, or plain old java objects (POJOs), from large flat files or streams.

Documentation at https://beanio.github.io/

134 questions
0
votes
2 answers

file conversion using beanIO

I am converting csv file to other .xx file using BeanIO. my question is if I have csv file like abc,def,ghi,jkl,mno pqr,stu,vwx,yzi,sdp my .xx file I want is to remove ,(comma) and put '$' instead abc$def$ghi$jkl$mno pqr$stu$vwx$yzi$sdp
Sanjay Rabari
  • 2,091
  • 1
  • 17
  • 32
0
votes
0 answers

Regular expression in XML to match a substring at a particular position

I am using an XML to validate a fixed length file.
Sagarika
  • 41
  • 6
0
votes
2 answers

complex Bean IO record ,multi segments (0-n occurences) pipe delimited

I have a scenario to map user information to Map of Objects (Map or List). I have say user info as follows CommonHeader(CX) block followed by 0 or more ID blocks followed by 0 or more Address blocks Below are valid formats for user…
Indrani
  • 21
  • 1
  • 3
0
votes
0 answers

BeanIO - ClassCastException when casting to expected type

I am reading a CSV file with BeanIO. The objects represented in the CSV are Field objects, and when I read the file, they come back as such, and I can see them in the debug utilities that everything is ok. However, when I try to parse the objects to…
smur89
  • 329
  • 1
  • 3
  • 15
0
votes
1 answer

JAVA Bean IO reading CSV file with spaces for numeric values

I am trying to read a CSV file having some integer values with spaces. There is no way i can get that file having integer values without spaces. Using bean io, when i am trying to read this file it gives a conversion error while reading integer…
ATHER
  • 3,254
  • 5
  • 40
  • 63
0
votes
1 answer

Writing Multiple Segments using BeanIO throws error as indeterminate size

Please help as writing multiple Segment throws error "A segment of indeterminate size may not follow another component of indeterminate size" Sample XML config is
Anand
  • 1,845
  • 2
  • 20
  • 25
0
votes
1 answer

BeanIO and dynamic number of columns in csv

We receive an excel file that has 2 columns of data. We save this file as csv and use BeanIO to read the csv. On occasion the excel will have empty columns after the 2 columns. When we save to csv these extra columns are included and we get a Beanio…
A.McCoy
  • 19
  • 1
  • 5
0
votes
1 answer

Always initialize an Object in BeanIO 2.0

I recently upgraded BeanIO in my project from 1.2.3 to 2.0.6 and as part of that upgrade I had to modify some of my mappings that where using the Bean element to start using Segment element. But what I noticed is that previously if a line in a…
goe
  • 343
  • 1
  • 4
  • 13
0
votes
1 answer

Parse key-value text file using camel-bindy or beanio

I have an option to use either bindy or beanIO camel components to parse a csv file. Besides this csv there is dat (txt) file which contains key-value. Is it possible to parse this file to Map using one of mentioned libraries?
Macchiatow
  • 607
  • 10
  • 24
0
votes
1 answer

BeanIO Writing two streams to the same file

I am trying to figure out the best way in which I can write two streams to the same file. The issue that I am trying to solve for is that the top of my file has an XML Header, and then at the bottom I need a comma delimited set of information to be…
parchambeau
  • 1,141
  • 9
  • 34
  • 56
0
votes
1 answer

BeanIO setting up mapping file XML

I am trying to set up my mapping.xml file for BeanIO writing and I am running into some issues. I am trying to get my output to look like the following:
1.0.0
parchambeau
  • 1,141
  • 9
  • 34
  • 56
0
votes
1 answer

BeanIO - Expected minimum 1 occurrences

I recently upgraded my BeanIO framework to 2.0.6 version to parse my flat (tab delimited) files to java objects and I noticed so weird behavior. I can't leave fields null in the last file line at the end because BeanIO throws this error message at…
goe
  • 343
  • 1
  • 4
  • 13
0
votes
1 answer

BeanIO - "Too few fields, expected 8 minimum", why?

I'm using BeanIO 1.2 in java and here's my mapping:
goe
  • 211
  • 1
  • 4
  • 16
-1
votes
1 answer

How read CSV file filtering by line with Beanio?

I want to read a CSV file with BeanIO and I want only the lines start with "CA" skipping the rest of the lines. I need the values "0" "1" "2" and "3" "4" "5" of lines "CA" AA123 BA456 CA789 CA012 CA345 DA678 EA901 BeanIO has a XML mapper.
davidleongz
  • 155
  • 2
  • 11
1 2 3
8
9