Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-82793

XML export fails with an error "maximum number of expressions in a list is 1000"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 8.3.0
    • 7.13.0, 7.19.0, 8.2.0
    • None

    Description

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Add 1000+ comments on a single page in Oracle DB, and 2100+ comments on a single page in SQL Server
      2. Run XML export

      Expected Results

      The backup file is generated properly.

      Actual Results

      The backups process fails, and the below exception is thrown:

      Caused by: com.atlassian.confluence.importexport.ImportExportException: Couldn't backup database data.    at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.backupEntities(AbstractXmlExporter.java:207)    at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.backupEverything(AbstractXmlExporter.java:100)    at com.atlassian.confluence.importexport.impl.FileXmlExporter.backupEverything(FileXmlExporter.java:97)    at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.doExport(AbstractXmlExporter.java:94)    at com.atlassian.confluence.importexport.impl.FileXmlExporter.doExportInternal(FileXmlExporter.java:62)    at com.atlassian.confluence.importexport.impl.FileXmlExporter.doExport(FileXmlExporter.java:56)    at com.atlassian.confluence.importexport.impl.XmlExporter.doExport(XmlExporter.java:52)    at com.atlassian.migration.agent.export.SpaceNoAttachmentsXmlExporter.lambda$doExportWrappingInTx$2(SpaceNoAttachmentsXmlExporter.java:107)    ... 42 moreCaused by: org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet    at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:228)    at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:392)    at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:337)    at com.atlassian.confluence.like.HibernateLikeEntityDao.getLikeEntities(HibernateLikeEntityDao.java:123)    at com.atlassian.confluence.importexport.impl.XmlExporterObjectHandleCollector.getLikesFromContent(XmlExporterObjectHandleCollector.java:180)    at com.atlassian.confluence.importexport.impl.XmlExporterObjectHandleCollector.getContentAndContentPropertiesFromSpace(XmlExporterObjectHandleCollector.java:143)    at com.atlassian.confluence.importexport.impl.XmlExporterObjectHandleCollector.addEntityHandlesFromSpace(XmlExporterObjectHandleCollector.java:120)    at com.atlassian.confluence.importexport.impl.XmlExporterObjectHandleCollector.getObjectHandles(XmlExporterObjectHandleCollector.java:99)    at com.atlassian.confluence.importexport.impl.XmlExporterObjectHandleCollector.getHandlesOfObjectsForExport(XmlExporterObjectHandleCollector.java:89)    at com.atlassian.confluence.importexport.impl.XmlExporter.getHandlesOfObjectsForExport(XmlExporter.java:108)    at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.backupEntities(AbstractXmlExporter.java:189)    ... 49 moreCaused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69)    at org.hibernate.loader.Loader.getResultSet(Loader.java:2168)    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1931)    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1893)    at org.hibernate.loader.Loader.doQuery(Loader.java:938)    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)    at org.hibernate.loader.Loader.doList(Loader.java:2692)    at org.hibernate.loader.Loader.doList(Loader.java:2675)    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2507)    at org.hibernate.loader.Loader.list(Loader.java:2502)    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:392)    at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1490)    at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1445)    at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1414)    at com.atlassian.confluence.like.HibernateLikeEntityDao.lambda$getLikeEntities$5(HibernateLikeEntityDao.java:128)    at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:385)    ... 58 moreCaused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807)    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983)    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)    at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3713)    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1167)    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471)    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60)    ... 75 moreCaused by: Error : 1795, Position : 8114, Sql = select likeentity0_.ID as ID1_55_, likeentity0_.CONTENTID as CONTENTID2_55_, likeentity0_.USERNAME as USERNAME3_55_, likeentity0_.CREATIONDATE as CREATIONDATE4_55_ from LIKES likeentity0_ where likeentity0_.CONTENTID in (:1  , :2  , :3  , :4  , :5  , :6  , :7  , :8  , :9  , :10  , :11  , :12  , :13  , :14  , :15  , :16  , :17  , :18  , :19  , :20  , :21  , :22  , :23  , :24  , :25  , :26  , :27  , :28  , :29  , :30  , :31  , :32  , :33  , :34  , :35  , :36  , :3 ... 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              richatkins Richard Atkins
              glipatov George Lipatov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: