I am stumped with a query recently around using 'step' scoped beans. While I understand that the scope 'step' is necessary in a 'late-binding' use case, I am not able to digest how is the use when trying to inject 'step' scoped beans to other beans. I will try to elaborate more :
1. I have a sample configuration as below :
Now I would like the various readers being injected in my Custom reader to also be of scope step. But when doing such a configuration I receive an exception as below :Code:<bean id="blRequestFileItemReader" class="com.XXXX.reader.RequestFileItemReader" scope="step"> <property name="flatFileItemReader" ref="blflatFileItemReader"/> <property name="customStaxEventItemReader" ref="blStaxEventItemReader"/> <property name="csvFileItemReader" ref="blCSVFileReader"/> <property name="batchId" value="#{jobParameters['batchId']}"/> <property name="batchLocateDAO" ref="blDAO"/> <property name="requestFileFormat" value="#{jobParameters['requestFileFormat']}"/> <property name="dataSource" ref="dataSource" /> </bean>
Cannot convert value of type [$Proxy13 ...... ]to required type [com.XXXX.reader.BLRequestItemReader]: no matching editors or conversion strategy found.
Can you please provide assistance or what I might be doing wrong ?
Thanks


Reply With Quote
