org.springframework.transaction.TransactionSystemException

Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web31

  • via Unknown by Unknown author,
  • Stack trace

    • org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:526)[spring-orm-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)[spring-batch-infrastructure-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)[spring-batch-infrastructure-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)[spring-batch-infrastructure-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:392)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:135)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at com.capgemini.esr2pon.component.daemon.common.utils.ScheduledTasks.launchProjects(ScheduledTasks.java:86)[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_80] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_80] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[na:1.7.0_80] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_80] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[na:1.7.0_80] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_80] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_80] Caused by: javax.persistence.RollbackException: Transaction marked as rollbackOnly at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:74)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final] at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)[spring-orm-4.2.5.RELEASE.jar:4.2.5.RELEASE] ... 32 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    kjhdofjosvskjhdofjosvs
    3 times, last one
    MalcshourMalcshour
    6 times, last one
    Unknown visitor
    Unknown visitorOnce,
    slashslash
    Once,
    8 more bugmates