I am working on a camel project in which we use the BeanIODataFormat to unmarshall a CSV file. I want to add a custom Error Handler class (implements BeanReaderErrorHandler) but cannot figure out how this can be accomplished.
I have a camel route: from(INBOUND_PROCESSING_ROUTE) .routeId("inBoundProcessingRoute") .process(getProcessor(CREATE_FILE_FROM_DATABASE)) .unmarshal(getCsvUnmarshaller()) .to(FILE_SPLITTER); which calls: private DataFormat getCsvUnmarshaller() { //return new BeanIODataFormat("beanio-request.xml?beanReaderErrorhandler=ErrorHandler.class", "transferRequests"); return new BeanIODataFormat("beanio-request.xml", "transferRequests"); } The BeanIO Docs say you can add a custom ErrorHandler to the reader, but I cannot find any examples or help on this. Has anyone done this? I tried adding to the beanio.xml file, but no support there. If you need to handle an exception and continue processing, it may be simpler to register a BeanReaderErrorHandler using the beanReader.setErrorHandler() method. The BeanReaderErrorHandler interface is shown below. Any exception thrown by the error handler will be rethrown by the BeanReader. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-BeanIODataFormat-Configure-ErrorHandler-for-BeanIO-Reader-tp5787005.html Sent from the Camel - Users mailing list archive at Nabble.com.