PDA

View Full Version : Problem in writing sample Batch job



prana
Feb 11th, 2008, 08:20 AM
Hi ,

I am new to spring framework and recently came across needto use spring batch framework.
After following introduction and sample code , I am trying to make a sample helloworld job, which doesnt do anything..
I have made a helloworld.xml & put with other sample xmls
added its entries in to .springBeans.

I have made a test class while trying to run this test class it always fails and error message is

org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [jobs/HelloWorld.xml]; nested exception is java.io.FileNotFoundException: class path resource [jobs/HelloWorld.xml] cannot be opened because it does not exist

at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:320)...

- I dont know if we are supposed to make entries at other place.
- Do we have detaile beginners document for spring batch ?
- Do I need to know spring framework before switching over to spring batch ?
- I have also tried modifying existing sample xml and putting my class name but again it is loading old class only ... ?? Dont know exactly how it is happening

Awaiting some angel to remove me out of this problem.

lucasward
Feb 11th, 2008, 11:01 AM
This doesn't look like a Spring Batch issue, it looks like there's an issue with the file not existing on your classpath. Spring core throws the FileNotFound exception when the ClassPathXmlApplicationContext tries to load the file.

prana
Feb 12th, 2008, 04:19 AM
Thanks, It started working. Now i need to explore more features of spring batch framework...
Will trouble you guys :)