I'm trying to set a custom processStrategy in Camel 2.23.2. I've tried several ways to reference it from the processStrategy uri parameter, but I always get this exception:
Caused by: java.lang.IllegalArgumentException: Could not find a suitable setter for property: processStrategy as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.component.file.GenericFileProcessStrategy with value #genericFileNoOpProcessStrategy"
Route definition
<bean id="genericFileNoOpProcessStrategy" class="org.apache.camel.component.file.strategy.GenericFileNoOpProcessStrategy"/>
<routeContext id="routes" xmlns="http://camel.apache.org/schema/spring">
<route id="route">
<from uri="seda:someEvent"/>
<pollEnrich>
<constant>file:/folder?fileName=file.csv&processStrategy=#genericFileNoOpProcessStrategy"</constant>
</pollEnrich>
What's the right way to reference it?
This would've been working if it weren't a user error (notice the quote
"
):Fixed with: