When using JpaItemWriter with step scope , I am seeing this error
This works if it is not step scoped. Its something to do with late binding but I don't any work around for this issue
Caused by: java.lang.IllegalArgumentException: No EntityManagerFactory specified
at org.springframework.util.Assert.notNull(Assert.jav a:112)
at org.springframework.orm.jpa.EntityManagerFactoryUt ils.doGetTransactionalEntityManager(EntityManagerF actoryUtils.java:165)
at org.springframework.orm.jpa.EntityManagerFactoryUt ils.getTransactionalEntityManager(EntityManagerFac toryUtils.java:142)
at org.springframework.orm.jpa.EntityManagerFactoryUt ils.getTransactionalEntityManager(EntityManagerFac toryUtils.java:124)
at org.springframework.batch.item.database.JpaItemWri ter.write(JpaItemWriter.java:78)
Has anyone encountered this issue?


Reply With Quote