Details
-
Bug
-
Resolution: Won't Fix
-
Medium
-
5.7, 5.8.2, 5.9.1-OD-2015.47.1, 1000.107.0
-
8
-
Severity 2 - Major
-
1
-
Description
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Workaround
Work around this problem by first restoring the site backup into 5.6 (link to the archives), then re-create the backup. Doing this will "fix" the backup file to contain the correct set of fields, and therefore, can be restored into 5.7 or later (including cloud instances).
Detailed Description
importing a site backup made from pre-5.0 (pre user-rename) into 5.7 or later fails, if there are content restrictions set. You will see an error (Error while importing backup: property does not exist: userName).
i think caused by commits made for https://jira.atlassian.com/browse/CONF-35969 , which removed the handling for old fields that have been removed/changed for user-rename.
Exception thrown in the logs:
ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /wiki/rest/oci/latest/import | userName: sysadmin com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: property does not exist: userName at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:429) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:387) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:154) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:258) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:50) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:50) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:210) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:77) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:85) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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 com.sun.proxy.$Proxy164.performImport(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy270.performImport(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy270.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:95) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:27) at com.atlassian.ondemand.confluenceimporter.service.importer.OnDemandImportLongRunningTask.runInternal(OnDemandImportLongRunningTask.java:170) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:27) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: property does not exist: userName at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:77) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:419) ... 44 more Caused by: org.xml.sax.SAXException: Error while importing backup: property does not exist: userName net.sf.hibernate.MappingException: property does not exist: userName at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:55) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:103) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:61) ... 45 more Caused by: net.sf.hibernate.MappingException: property does not exist: userName at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyType(AbstractEntityPersister.java:1133) at com.atlassian.confluence.importexport.xmlimport.persister.AbstractObjectPersister.getPrimitivePropertyValue(AbstractObjectPersister.java:45) at com.atlassian.confluence.importexport.xmlimport.persister.HibernateContentPermissionPersister.updateProperty(HibernateContentPermissionPersister.java:67) at com.atlassian.confluence.importexport.xmlimport.persister.HibernateContentPermissionPersister.persist(HibernateContentPermissionPersister.java:43) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:47) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:37) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:51) ... 57 more
Attachments
Issue Links
- Discovered while testing
-
CONFCLOUD-53839 Confluence Site Import to Cloud Fail
- Closed
- is caused by
-
CONFSERVER-35969 XML space import failed from the latest OD for Oracle Database
- Closed
- relates to
-
CONFCLOUD-39862 importing a site backup made from pre-5.0 (pre user-rename) into 5.7 or later fails when there are content restriction set on any page
- Closed
- mentioned in
-
Page Loading...