• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Running a batch

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got another thread running but I think thats got too much data Forum link

I was trying to run the example in the Spring batch documentation but I can't seem to autowire the right classes. Couldn't correlate it to any sample in the spring samples also. Could someone guide me.



My configuration




 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the actual code, or are you missing method name?

Thanks

Mark
 
Jay Abrahm
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just the method name ;-) I thought it was insignificant. Was trying to make it as readable as possible. I even got the package names in.

This is straight out of the Spring documentation. Haven't changed anything. All three methods seem to be syntactically wrong.
createJobExecution
saveOrUpdate
createJobExecution

Got some success kick-starting the batch with quartz.SchedulerFactoryBean so was trying my luck with that but please do let me know if you can find something amiss here.

And Mark, you had mentioned in the previous post that the Spring Batch documentation it good. I woudln't disagree but a quick-start guide or a 3-step guide (whatever) would have helped.
 
Ranch Hand
Posts: 607
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok its not clear what the problem you facing is - but if your trying to run the job then the commandLineJobRunner does all the hardwork,

More here

If your just tetsing (Say Junit) the @SpringRunner all with JobLauncherTestUtils takes care of all the plumbing code.
End To End Testing

In all the Batch Jobs I have written I never reference JobRepository - There enough help to do all the plumbing!

As for a 3-4 page guide to Spring Batch - I agree its a good idea. So why don't you start one? You already seem to have a 'nice' start up guide post here where you kind of gone through the steps!
I do suggest giving the whole Spring Batch documentation a read, it does cover everything.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!