Announcement Announcement Module
Collapse
No announcement yet.
Getting Transaction Manager does not support Suspend transaction exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Can you please post the stack trace?

    Comment

    Working...
    X