Results 1 to 2 of 2

Thread: Getting Transaction Manager does not support Suspend transaction exception

  1. #1
    Join Date
    Sep 2012
    Posts
    4

    Post Getting Transaction Manager does not support Suspend transaction exception

    Hi,

    I created sample spring batch project and integrated with web container to schedule the jobs from screen.

    Earlier I used Spring-batch-core-2.0.4 jar. Everything was working fine.

    Now I Changed it to Spring-batch-core-2.1.9 jar and When I try to run the job through screen I am getting Transaction Manager does not support Suspend transaction exception.


    Below the code snippet
    ----------------------


    WebApplicationContext ctx = WebApplicationContextUtils
    .getRequiredWebApplicationContext(getServletReques t()
    .getSession().getServletContext());
    JobRegistry registry1 = (JobRegistry) ctx
    .getBean(JOB_REGISTRY);
    JobRepository jobRepository1 = (JobRepository) ctx
    .getBean(JOB_REPOSITORY);
    setJobRepository(jobRepository1);
    Job job = registry1.getJob(batchMaster.getBatchDataValue());

    JobLauncher jobLauncher = (JobLauncher) ctx
    .getBean(JOB_LAUNCHER);

    // create your parameters for the job
    // you can use the JobParameterBuilders
    JobParametersBuilder builder = new JobParametersBuilder();
    builder.addLong("run.id", System.currentTimeMillis());

    JobParameters jobParameters = builder.toJobParameters();

    JobExecution jobExecution = jobLauncher.run(job, jobParameters);

    it is giving exception when launching the job.


    I am using ResourcelessTransactionmanager

    Please help

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

    Default

    Can you please post the stack trace?
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

Tags for this Thread

Posting Permissions

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