Results 1 to 6 of 6

Thread: Unable to Customize the Batch Admin

  1. #1

    Default Unable to Customize the Batch Admin

    http://static.springsource.org/sprin...ence/jobs.html

    I followed the above link and added a job in jobs.xml

    <batch:job id="footballJob">
    <batch:step id="playerload" parent="s1" next="gameLoad" />
    <batch:step id="gameLoad" parent="s3" next="playerSummarization" />
    <batch:step id="playerSummarization" parent="s3" />
    </batch:job>

    The directory structure is shown here...
    Capture.jpg

    But i am getting the same jobs...the default ones..
    infinite
    job1
    job2


    I see in the console that the file jobs.xml is not even being loaded..but in the page at the above url says "Include Spring XML files in META-INF/spring/batch/jobs. Each file should be self-contained (except for Batch execution components like the jobRepository which are provided centrally), and carry one or more bean definitions for a Spring Batch Job. When the application starts these files are scanned and loaded as child contexts, and then the jobs are registered with a JobRegistry in the parent."

    Where am i making the mistake..?

    Please help..

  2. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    What version of admin are you using?
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

  3. #3

    Default

    I am using 1.2.1.RELEASE

  4. #4
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    From the information above, I'm not sure. In older versions the location we scanned for was different (/META-INF/batch/*-context.xml I believe). I'd start by verifying the jar files you are getting in the WAR (for example, if you're using the sample template included in STS, you're using 1.0.0.M1 I believe instead of 1.2.1.RELEEASE).
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

  5. #5

    Default

    Yeah u were right.
    I changed it to 1.2.1.RELEASE
    But now i m facing a new prob.
    It says java.lang.ClassNotFoundException: org.springframework.batch.core.configuration.suppo rt.AutomaticJobRegistrar.
    So i changed the version of spring-batch-core to 2.1.9.RELEASE
    But now it gives error in module-context.xml under META-INF\batch in the constructor-arg as there is no constructor with 2 arguments in any constructors..
    What shud i do.. please help... It's troubling me for 1 week now..

  6. #6
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    In the module-context.xml that is provided by default, there are a couple jobs that are configured. One of which is a partitioned job. if you remove those jobs (I'm assuming you don't need them), you should be ok.
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •