This content has been marked as final.
Show 1 reply
-
1. Re: Failed to create artifact with ref name jdbcItemReader
cfang Aug 9, 2016 2:20 PM (in response to richardmoore)First check for META-INF/beans.xml in the classpath, for CDI SE to discover jdbcItemReader.
jdbcItemReader has class-level @Named annotation so should be automatically discovered already by CDI SE if the above beans.xml is present.
META-INF/batch.xml can bind a ref name to its class name, if the above still does not solve the problem, though I think it should:
<?xml version="1.0" encoding="UTF-8"?>
<batch-artifacts xmlns="http://xmlns.jcp.org/xml/ns/javaee">
<ref id="csvItemReader" class="org.jberet.support.io.CsvItemReader" />
<ref id="jsonItemWriter" class="org.jberet.support.io.JsonItemWriter" /><ref id="whateverRefName" class="org.jberet.support.io.JdbcItemReader" />
</batch-artifacts>