【问题标题】:TransactionSystemException: Could not commit JPA transaction;TransactionSystemException:无法提交 JPA 事务;
【发布时间】:2015-07-24 11:03:26
【问题描述】:

我在更新其中一个数据库表字段时遇到了这个问题:

org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction"

【问题讨论】:

  • 堆栈跟踪中必须有更多...
  • 非常很少继续。告诉我们更多关于何时发生这种情况的信息。另外,向我们展示更多的堆栈跟踪,以及它发生的代码。也许那时我们可以帮助您诊断问题。

标签: java mysql spring-mvc


【解决方案1】:

这可能由于多种原因而发生。但是导致此问题的常见原因之一是忘记将更新过程中使用的方法之一注释为@Transactional。有没有可能是这种情况?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-08
    • 1970-01-01
    • 2020-05-11
    • 1970-01-01
    • 2011-03-13
    • 1970-01-01
    • 2021-08-26
    相关资源
    最近更新 更多