org.springframework.dao.DataAccessResourceFailureException

Unable to write to file resource: [class path resource [report.xml]]; nested exception is java.io.FileNotFoundException: class path resource [report.xml] cannot be resolved to URL because it does not exist

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web99

Stack trace

  • org.springframework.dao.DataAccessResourceFailureException: Unable to write to file resource: [class path resource [report.xml]]; nested exception is java.io.FileNotFoundException: class path resource [report.xml] cannot be resolved to URL because it does not exist at org.springframework.batch.item.xml.StaxEventItemWriter.open(StaxEventItemWriter.java:436)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.item.xml.StaxEventItemWriter.open(StaxEventItemWriter.java:400)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:310)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:197)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE] at com.mkyong.App.main(App.java:21)[classes/:na] Caused by: java.io.FileNotFoundException: class path resource [report.xml] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:48)[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.batch.item.xml.StaxEventItemWriter.open(StaxEventItemWriter.java:427)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE] ... 15 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Михайло ТітовМихайло Тітов
4 times, last one
Unknown UserUnknown User
7 times, last one
OmyaOmya
Once,
23 more bugmates