camel-bindy breaks when used in a project packaged as a war in SwitchYard
Issue
- When I use camel-bindy in a SwitchYard project that is packaged as a war, something is breaking in the classloading.
- When I try to run the same code packaged as a jar it works.
- I have debugged the process and it seams like the classloader fails to load my POJO class with the
@CsvRecord
annotations. It just returns an empty list and the result is that the following error is thrown:
java.lang.IllegalArgumentException: The separator has not been defined in the annotation @CsvRecord or not instantiated during initModel. must be specified: java.lang.IllegalArgumentException: The separator has not been defined in the annotation @CsvRecord or not instantiated during initModel. must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:295) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:125) [camel-bindy-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.