net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]

Atlassian JIRA | Immanuel Siagian [Atlassian] | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Summary Importing a word file with more than 255 characters in its heading will cause HibernateSystemException ERROR h3. Steps to reproduce # Create a word file with multiple headings. One of the headings contains a sentence that is more than 255 characters # Select the "Import Word Document" and select the word document that was just created # Select {{Level 3 Headings}} for {{Split by heading:}} # It will throw an ERROR h3. Expected Results Confluence should throw an INFO/WARNING saying that one of the headings contains more than 255 characters. As such, it cannot complete the import h3. Actual Results It will throw the following ERROR {noformat} Cause org.springframework.orm.hibernate.HibernateSystemException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]; nested exception is net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) caused by: net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:475) caused by: net.sf.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90) caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'TITLE' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2055) caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'TITLE' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4235) Stack Trace:[hide] org.springframework.orm.hibernate.HibernateSystemException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]; nested exception is net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:477) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:378) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPage(HibernatePageDao.java:146) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPage(HibernatePageDao.java:173) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao$1.getBySpaceAndTitle(CachingPageDao.ja ... {noformat} h3.Workaround Modify the sentence to be less than 255 characters

    Atlassian JIRA | 2 years ago | Immanuel Siagian [Atlassian]
    net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]
  2. 0

    h3. Summary Importing a word file with more than 255 characters in its heading will cause HibernateSystemException ERROR h3. Steps to reproduce # Create a word file with multiple headings. One of the headings contains a sentence that is more than 255 characters # Select the "Import Word Document" and select the word document that was just created # Select {{Level 3 Headings}} for {{Split by heading:}} # It will throw an ERROR h3. Expected Results Confluence should throw an INFO/WARNING saying that one of the headings contains more than 255 characters. As such, it cannot complete the import h3. Actual Results It will throw the following ERROR {noformat} Cause org.springframework.orm.hibernate.HibernateSystemException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]; nested exception is net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) caused by: net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:475) caused by: net.sf.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90) caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'TITLE' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2055) caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'TITLE' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4235) Stack Trace:[hide] org.springframework.orm.hibernate.HibernateSystemException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]; nested exception is net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280] at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:477) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:378) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPage(HibernatePageDao.java:146) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPage(HibernatePageDao.java:173) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao$1.getBySpaceAndTitle(CachingPageDao.ja ... {noformat} h3.Workaround Modify the sentence to be less than 255 characters

    Atlassian JIRA | 2 years ago | Immanuel Siagian [Atlassian]
    net.sf.hibernate.HibernateException: could not insert: [com.atlassian.confluence.core.BodyContent#6488280]

    Root Cause Analysis

    1. net.sf.hibernate.HibernateException

      could not insert: [com.atlassian.confluence.core.BodyContent#6488280]

      at net.sf.hibernate.persister.EntityPersister.insert()
    2. net.sf.hibernate
      EntityPersister.insert
      1. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:475)
      1 frame