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

Space Import failed with net.sf.hibernate.UnresolvableObjectException and net.sf.hibernate.LazyInitializationException:

    XMLWordPrintable

Details

    Description

      Mark H tried to import data into Extranet and it failed. There were a couple of errors about failing to remove the temp/import directories early on, which are weird because I don't get why there are two of them (and there are indeed two identical import directories in temp containing identically sized entities.xml files. Then much later there was an UnresolvableObjectException. It may be relevant that the instance was (and is) doing a full re-index at the time.

      Afterwards, the space seemed to be somewhat intact but without any attachments.

      The stacktraces were:

      2011-10-11 00:47:25,434 ERROR [Long running task: Importing data] [sf.hibernate.impl.IteratorImpl] next could not get next result
       -- referer: https://extranet.atlassian.com/admin/backup.action | url: /admin/restore.action | userName: mhrynczak | act
      ion: restore
      net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 1948483595, of class: com.atlassi
      an.confluence.pages.Attachment
              at net.sf.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:38)
              at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1962)
              at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69)
              at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
              at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:130)
              at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:93)
              at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:127)
              at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachm
      entCopier.copy(AbstractHibernateAttachmentDao.java:398)
              at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importAttachments(FileBackupImporter.java:
      335)
              at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:1
      15)
              at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:108)
              at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:74)
              at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:67)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:
      182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy85.importAs(Unknown Source)
              at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:58
      )
              at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunning
      Task.java:21)
              at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      

      and

      2011-10-11 00:47:25,434 ERROR [Long running task: Importing data] [sf.hibernate.impl.IteratorImpl] next could not get next result
       -- referer: https://extranet.atlassian.com/admin/backup.action | url: /admin/restore.action | userName: mhrynczak | action: restore
      net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem
              at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:133)
              at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachmentCopier.copy(AbstractHibernateAttachmentDao.java:398)
              at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importAttachments(FileBackupImporter.java:335)
              at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:115)
              at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:108)
              at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:74)
              at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:67)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy85.importAs(Unknown Source)
              at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:58)
              at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21)
              at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 1948483595, of class: com.atlassian.confluence.pages.Attachment
              at net.sf.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:38)
              at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1962)
              at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69)
              at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
              at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:130)
              at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:93)
              at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:127)
              ... 26 more
      

      Attachments

        Activity

          People

            shaffenden Steve Haffenden (Inactive)
            don.willis@atlassian.com Don Willis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: