-
Dec 19th, 2012, 03:27 PM
#1
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
-
Dec 21st, 2012, 01:57 PM
#2
Can you please post the stack trace?
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
-
Forum Rules