I am trying to process two `.csv` files and to persist their data to the database.
I am using java dsl and not springs for the same.

**To explain the scenario a bit better :**  

I am reading two `.csv` files and processing them to upload their data in the sql database.The steps I performed for this are 

1. Specify the engine initialiser in the servlet container file.
2. Create an `EngineInitialiser`
3. Bind the EngineInitialiser to the core Engine.
4. Create the dao files required to persist the data to the database.
5. Create the engine module which defines the bindings.
6. Define the files which define the format specific for the files.

However, the problem is

There is a problem when trying to unmarshal the exchange to a `BindyCsvDataFormat`. There are two format class files as I have specified one for the file1 input file and one for the `file2.csv`.

Now bindy is trying to map the format to the parent class file .However, when it picks up the `file1.csv` it maps it to both the model1 and model2 defined under the same package.
However, it should map it to only one class .How do I force it to map to only one format class?  

**The error is as follows:**

> 
> java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory), line: 1
>  at org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.java:215)
>  atorg.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:169)atorg.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:58)
>  at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>  at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>  at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>  at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>  at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)
>  at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)
>  at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>  at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:304)
>  at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>  at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>  at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>  at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>  at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:50)
>  at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>  at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>  at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>  at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
>  at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:352)
>  at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:175)
>  at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:136)
>  at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)
>  at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  at java.lang.Thread.run(Thread.java:619)
>  |#]
> 
> 
>