Solved

Developing batch processing application using Spring Batch

Posted on 2008-06-16
6
1,414 Views
Last Modified: 2013-11-13
Hello Experts,

I need to develop a batch processing application using Spring Batch, I am not sure where to start from.
If you can please provide me with some sample application /source code.

Thanks in advance
0
Comment
Question by:annapolistech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21827396
I believe you are talking about the framework found at http://static.springframework.org/spring-batch/ .  If so that is a good place to start.  The documentation links on the left side of that page have "Use Cases", a User Guide, etc that seem to be inforrmative.  I don't know that framework so I can't say how helpful it is but there were some examples and help.  It would be my first start.

If you need more help then I can try to provide some more info but I would also point out the Forum link.

Since it is a framework are you using it with a specific language or environment?  That may be important for finding the best examples and info on using this.

Let me know how this helps or if you have a question.

bol
0
 

Author Comment

by:annapolistech
ID: 21844029
Hi,
Thanks for your reply.
I am developing a batch processing system in Java, using Spring Batch.
I did manage to run the sample application posted on the following URL

http://www.jroller.com/0xcafebabe/entry/spring_batch_hello_world_1

I had some issues running the sample code, but I have managed to fix those, using a tweak as follows.
There is a Maven batch file (job.bat) which needs a couple of parameters from a .java file  to kick off the batch processing.

I had a problem in starting the batch process using the .bat file, so I used another .java file which functions exactly like the .bat file to start the processing.

Can you go through the .bat file and let me know whether I can rewrite the batch file without using Maven.

Since this is a relatively new concept, there is very little documentation available.

Thanks again for your help.
Following is the .bat file
 
mvn clean compile exec:java -Dexec.mainClass=org.springframework.batch.core.launch.support.CommandLineJobRunner -Dexec.args="simpleJob.xml simpleJob"

Open in new window

0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 21848039
The line above depends on Maven.  The first "word" is the command to run Maven's program file.  The rest are arguments and info on how or what to run.

Having said that I don't believe you have to use Maven.  It seems like Maven is just a tool to manage the build.  You should be able to do the build without it although you may have to find and fix what is causing the error.  The "non-Maven" version of the line above would be ...

java org.springframework.batch.core.launch.support.CommandLineJobRunner "simpleJob.xml simpleJob"

I don't know if ther arguments (the part in quotes) need the quotes or if there are really two arguments.  If you are missing some "dependencies" then that may explain the error but successful build with Maven, which will download them and help with that part.

I hope this helps and answers you latest question.  Let me know if you have a problem or question.  If you need a lot of help with Maven then it might help to open a new question for it.

bol
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:annapolistech
ID: 21852965
Hi bol,

Thanks again for your solution.
I have tried using,
java org.springframework.batch.core.launch.support.CommandLineJobRunner "simpleJob.xml simpleJob"
but may be due to some class path issue, the batch file is not executing.
I'll try againg doing some modification in the batch file
There are two arguments present in the .bat file - simpleJob.xml and simpleJob

Thanks

0
 

Author Comment

by:annapolistech
ID: 21873266
Hi boI,

Thanks for your assistance.  Since this a relatively new technology, there is very less material available to go through. I guess trying out different things will eventually make it clearer and understandable.
So I am closing this question now.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21876128
Your welcome!  I'm glad I could help and sorry I couldn't help more with Maven.  Thanks for the fun question, the grade and the points.

bol
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question