"Large Objects may not be used in auto-commit mode" error in the migration assistant

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Learn what to do when the error "Large Objects may not be used in auto-commit mode" happens when using the Confluence Cloud Migration Assistant (CCMA).

Overview

The atlassian-confluence.log file will show the below error or a similar error stack when using the CCMA.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Uncaught exception f886f16c-f064-4b06-b75f-754205627514 thrown by REST service: org.hibernate.HibernateException: Unable to access lob stream ... javax.persistence.PersistenceException: org.hibernate.HibernateException: Unable to access lob stream at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1626) at org.hibernate.query.Query.getResultList(Query.java:165) at com.atlassian.migration.agent.store.jpa.impl.DefaultQueryBuilder.prepareList(DefaultQueryBuilder.java:172) at com.atlassian.migration.agent.store.jpa.impl.DefaultEntityManagerTemplate.execute(DefaultEntityManagerTemplate.java:29) at com.atlassian.migration.agent.store.jpa.impl.DefaultQueryBuilder.list(DefaultQueryBuilder.java:118) Caused by: org.hibernate.HibernateException: Unable to access lob stream at org.hibernate.type.descriptor.java.DataHelper.extractString(DataHelper.java:270) at org.hibernate.type.descriptor.java.StringTypeDescriptor.wrap(StringTypeDescriptor.java:75) at org.hibernate.type.descriptor.java.StringTypeDescriptor.wrap(StringTypeDescriptor.java:22) at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1.doExtract(ClobTypeDescriptor.java:44) Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode. at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:243) at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:229)

Solution

The solution to it is to change the auto-commit mode. The steps will be different based on the PostgreSQL version used:

PostgreSQL 10 or below:

Change the auto-commit mode by modifying the database connection URL located in the confluence.cfg.xml file;

  1. Stop Confluence

  2. Take a backup of the <Confluence Installation Directory>/confluence.cfg.xml file.

  3. Edit the *<Confluence Installation Directory>/confluence.cfg.xml* file

  4. Change the database connection URL with the below one to disable *defaultAutoCommit*

    1   <property name="hibernate.connection.url">jdbc:postgresql://<Database Connection URL>?defaultAutoCommit=false</property>
  5. Start Confluence

PostgreSQL 11 or above:

Change the auto-commit mode by adding an additional property to the confluence.cfg.xml file to disable auto-commit mode;

  1. Stop Confluence

  2. Take a backup of the <Confluence Installation Directory>/confluence.cfg.xml file.

  3. Edit the *<Confluence Installation Directory>/confluence.cfg.xml* file

  4. Add the following property;

    1 <property name="hibernate.connection.autocommit">false</property>
  5. Start Confluence

Updated on April 17, 2025

Still need help?

The Atlassian Community is here for you.