Hi Chudak,
I have configured my application according to your posting. My job is processing about 600k records for each run. The job involves loading a fixed length flat file with file size about 300MB.
After the 4th run, I got this out of memory error
Code:
java.lang.OutOfMemoryError: Java heap space at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2053) at org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:934) at org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassLoader.java:1069) at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:159) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:174) at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) at org.springframework.batch.core.resource.StepExecutionResourceProxy.exists(StepExecutionResourceProxy.java:112) at org.springframework.batch.item.file.FlatFileItemReader.doOpen(FlatFileItemReader.java:226) at org.springframework.batch.item.support.AbstractBufferedItemReaderItemStream.open(AbstractBufferedItemReaderItemStream.java:154) at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:103) at org.springframework.batch.core.step.item.ItemOrientedStep.open(ItemOrientedStep.java:462) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:167) at org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100) at org.springframework.batch.core.configuration.support.ClassPathXmlApplicationContextJobFactory$ContextClosingJob.execute(ClassPathXmlApplicationContextJobFactory.java:107) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86) at java.lang.Thread.run(Thread.java:619)
I have started my Tomcat server with -Xmx1024m
If I run the job from command line (in separated JVM), the process is ok for any number of runs.
Do you have any advice on where is the issue?
Thank You
Vito