legacy-knowledge-base
公開されました Sep. 10, 2025

Groovy スクリプトの実行時のエラー: java.sql.SQLException: autocommit=true の場合は commit を呼び出せません

written-by

Alfonso Abad

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • commit 命令を含む Groovy スクリプトを実行すると、次のエラーで失敗します。
 java.sql.SQLException: Can't call commit when autocommit=true

Environment

  • DXP 7.2

解決策

  • portal-ext.properties ファイルで、次の変更を行います
    • jdbc コネクタの最後に&を追加します: 3relaxAutoCommit=true
    • プロパティを追加します: jdbc.default.autoCommit=false
  • ポータルを再起動し、スクリプトを再度実行します。

did-this-article-resolve-your-issue

legacy-knowledge-base