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

エクスポートサイトのLAR生成時にJDBCのロールバックエラーが発生する。

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

問題

  • LARを生成しようとすると、ポータルに以下のメッセージが表示されます:
Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed
  • また、コンソールでは、ログが表示されます:
11:35:24,527 ERROR [liferay/background_task-1][JDBCExceptionReporter:82] Connection has already been closed.
11:35:24,540 ERROR [liferay/background_task-1][JDBCExceptionReporter:82] Connection has already been closed.
11:35:24,573 ERROR [liferay/background_task-1][JDBCTransaction:120] JDBC rollback failed
java.sql.SQLException: Connection has already been closed.

環境

  • Tomcat上のPortal 6.2

解像度

  • Connection Poolのタイムアウトを大きく指定する。 パラメータ removeAbandonedTimeout は、デフォルトで300に設定されています。
  • コンテキストに removeAbandonedTimeout パラメータを追加し、デフォルトより大きな値(XYZ値)を設定します。この値は環境によって異なります。
<Context ...>
...
<Resource name="jdbc/EmployeeDB"
auth="Container"
type="javax.sql.DataSource"
username="dbusername"
password="dbpassword"
driverClassName="org.hsql.jdbcDriver"
url="jdbc:HypersonicSQL:database"
maxTotal="8"
maxIdle="4"
removeAbandonedTimeout = XYZ/>
...
</Context>
  • それでもエクスポートに失敗する場合は、 値を false に設定し、時間制限を設けないようにします。 そして、セキュリティのために、適切な時間でエクスポートが成功した後に、再度設定する。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base