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
0 answers

Camel BeanIO Replacement

I know that after 3.16 version of camel BeanIO becomes deprecated and removed from camel. I cannot seem to find a replacement. I have seen some people write their own code to replace it but I am trying to avoid having to do that. Does anyone have a…
0
votes
1 answer

Parsing XML with nested elements using BeanIO in Spring Batch Application

I have a spring boot with a spring batch application that processes one input XML file, as you can see the XML has a container element results and a repeating element contact. While trying to process it I'm getting the error describe at the…
Somebody
  • 2,667
  • 14
  • 60
  • 100
0
votes
1 answer

BeanIO default values for optional segments fields for XML input file?

I have a sample input XML with below structure: Peter Ohio John
Somebody
  • 2,667
  • 14
  • 60
  • 100
0
votes
1 answer

How to create beanio that can handle multiple different lengths for one type of record?

I created a beanio for a file. The issue is the file can be varying lengths which throws an error when a certain field is expected to occur or have a certain length. I was able to get past the issue where the beanio was expecting a certain field…
Cris Manrique
  • 83
  • 1
  • 7
0
votes
1 answer

How to skip a particular empty field from appearing in XML file based on XSD file

I have an XSD definition as : . ..lines ..of ..XML code
0
votes
0 answers

How to parse a file with different lengths using a beanio?

I need to parse some files and I'm using a beanio xml file to map out the file to an object. The issue is some files have less characters than others which causes an invalid record type error when unmarshalling. I tried setting minOccurs="0" for all…
Cris Manrique
  • 83
  • 1
  • 7
0
votes
2 answers

How do I use BeanIO minLength record level

I have beanio mappings file for delimeted file and required check is working but minLength is not working. Could you help with this? Geroge person record line is not showing minLength error for salary empty.
sunleo
  • 10,589
  • 35
  • 116
  • 196
0
votes
0 answers

Camel Bean IO use Java annotation instead of Xml Mapping

We are creating an output file which has different format per line, and this group of lines will repeat. Bean Io provides excellent support for the same with "groups" and "records" We are using Camel for the same and BeanIo dataformater in Camel is…
amps
  • 31
  • 2
0
votes
1 answer

How to skip field when empty in beanio?

The requirement is to skip field when its empty. eg -
0
votes
1 answer

How to format beanio in Java?

Wasn't sure how to better describe the problem in the title, but basically I have a beanio XML where one of the fields is this: My issue is that the value that goes here can be negative…
Cris Manrique
  • 83
  • 1
  • 7
0
votes
1 answer

Beanio - How to write to stream object

I am trying to create a fixed length file output using beanio. I don't want to write the physical file, instead I want to write content to an OutputStream. ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); StreamFactory factory =…
User_1940878
  • 321
  • 1
  • 6
  • 25
0
votes
1 answer

BeanIo nested list fixedlength marshal and unmarshal

I can't figure out why nested object aren't clearly parsed from BeanIo. The parsing is based on "fixedlength", so positional. Give these pojos: @Record(minOccurs=1) @Data public class Address { @Field(length=2)//,at=1) private String prov; …
Black.Jack
  • 1,878
  • 2
  • 22
  • 39
0
votes
1 answer

Does BeanIO require I provide a setter

It appears BeanIO requires I provide setters for my fields. Is this necessary? I created a BeanIO writer, I intend only to write files, and I have getters for each field - why would I need setters?
Upperstage
  • 3,747
  • 8
  • 44
  • 67
0
votes
1 answer

BeanIO: Format number with fixed length for integer and decimal places without separator

Is there a way to format a number with fixed length adding separator using Anotation? I ALWAYS receive 10 integer positions and 2 decimal, getting a fixed length of 12 The field anotattion I use: @Field(at=576, length=12, format="###.##") private…
0
votes
1 answer

BeanIO how to skip/filter @Group in fixedLength

I'm trying to read a fixedlength file. I want to extract list of Document, but filtered only with RecordHeader (RH) with field value "BB". So skip Document with recordHeader equals: RH20210607AA This is an example of my class…
Giulio Buz
  • 13
  • 4
1 2 3
8 9