Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-66425

After migration from Confluence Server to cloud pages are displaying GraphQL errors

    XMLWordPrintable

Details

    Description

      Summary

      After migration from Confluence Server to Confluence Cloud several pages are presenting GraphQL errors such as this:

      Error: GraphQL error: org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1.
      

      Environment

      Cloud

      Steps to Reproduce

      1. Import Confluence server into the cloud
      2. Try to use any page

      Expected Results

      The page loads at the first access without errors

      Actual Results

      The page will display a GraphQL error at the first load

      At the browser logs we can see the following:

      Error: GraphQL error: org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1.
      Error info: 
          in n
          in WithStyles(n)
          in ContentBodyRedux
          in ContentBodyWrapper
          in div
          in SPATransitionManager
          in Connect(SPATransitionManager)
          in t
          in n
          in InjectIntl(n)
          in n
          in WithStyles(n)
          in ExperienceTrackerWrapper
          in ExperienceWrapper
          in ExperienceTrackingProvider
          in ExperienceProvider
          in div
          in div
          in ContentContainerComponent
          in t
          in n
          in InjectIntl(n)
          in ContentContainer
          in t
          in p
          in withApollo(t)
          in div
          in styled.div
          in div
          in n
          in e
          in ContentScreenComponent
          in t
          in n
          in InjectIntl(n)
          in ContentScreen
          in n
          in WithAnalytics(n)
          in WithStyles(WithAnalytics(n))
          in div
          in Unknown
          in InjectIntl(Component)
          in ShortcutContextComponent(InjectIntl(Component))
          in ViewPageRedux
          in t
          in p
          in withApollo(t)
          in ViewPageGraphQL
          in Connect(ViewPageGraphQL)
          in t
          in div
          in t
          in t
          in div
          in Unknown
          in WithStyles()
          in Connect(WithStyles())
          in t
          in div
          in div
          in n
          in e
          in div
          in AtlaskitThemeProvider__LegacyReset
          in t
          in Provider
          in t
          in div
          in ErrorBoundaryComponent
          in WithAnalytics(ErrorBoundaryComponent)
          in div
          in styled.div
          in NavigationLoader
          in n
          in e
          in NavigationV2Integration
          in NavigationV2IntegrationLoader
          in t
          in p
          in withApollo(t)
          in n
          in ShortcutContextComponent(n)
          in WithAnalytics(ShortcutContextComponent(n))
          in WithStyles(WithAnalytics(ShortcutContextComponent(n)))
          in WithStyles(WithStyles(WithAnalytics(ShortcutContextComponent(n))))
          in Connect(WithStyles(WithStyles(WithAnalytics(ShortcutContextComponent(n)))))
          in n
          in p
          in withApollo(n)
          in n
          in t
          in withRouter(n)
          in t
          in r
          in Connect(r)
          in ShortcutsProvider
          in Connect(ShortcutsProvider)
          in D
          in e
          in ChangeboardingManagerComponent
          in Connect(ChangeboardingManagerComponent)
          in ErrorBoundaryComponent
          in WithAnalytics(ErrorBoundaryComponent)
          in e
          in ConfluenceAnalyticsListener
          in e
          in e
          in e
          in e
          in WithAnalyticsEvents(e)
          in Unknown
          in Unknown
          in t
          in p
          in withApollo(t)
          in n
          in WithAnalytics(n)
          in Connect(WithAnalytics(n))
          in n
          in WithAnalytics(n)
          in n
          in WithTranslations
          in Connect(WithTranslations)
          in App
          in e
          in e
          in e
          in e
          in e
          in e
          in e
          in e
          in e
          in e
          in e
          in IntlProvider
          in n
          in Connect(n)
          in i
          in t
          in e
          in n
          in h
          in Root.

      And at the application logs:

       	 err:	{	[-]	
          	 class:	[	[-]	
            	 org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException	
            	 org.hibernate.StaleStateException	
          	]	
          	 stack:	 org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
      org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:283)
      org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:368)
      org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:328)
      com.atlassian.confluence.content.persistence.hibernate.PluginContentHibernateDao.findByQuery(PluginContentHibernateDao.java:68)
      ***
      Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
      org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
      ***
      org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:361)
      ... 420 more	
        	}	
      ***
        	 message:	 Error returned from query for operation '<unnamed>; 'Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1	
        	 micros_container:	 confluence	
      

      Notes

      After reloading the page the error will disappear and the user will be able to load the page again without errors, the error only happens at the first load.

      Workaround

      Reload the page

      Attachments

        Issue Links

          Activity

            People

              vchuryukin Vladimir Churyukin
              cmeireles Charles Meireles
              Votes:
              10 Vote for this issue
              Watchers:
              36 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: