Legacy Knowledge Base
Published Sep. 10, 2025

JDBC roll back error when generating LAR to export sites

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Whenever a LAR is tried to be generated the following message shows on the portal:
Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed
  • Also on the console, the logs shows:
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.

Environment

  • Portal 6.2 on Tomcat

Resolution

  • Specify a greater timeout on the Connection Pool. The parameter removeAbandonedTimeout is set to 300 by default.
  • In the context add the removeAbandonedTimeout parameter with a greater value than the default one (The XYZ value) The value will depend on the environment.
<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>
  • If the export still fails, set the value to false so there is no time limit. Then, for security, configure it again after the export successfully happens with an appropriate time.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base