net.sf.hibernate.MappingException: property does not exist: userName

Atlassian JIRA | Joe Xie [atlassian] | 1 year ago
  1. 0

    h2. Workaround Work around this problem by first restoring the site backup into 5.6 ([link to the archives|https://www.atlassian.com/software/confluence/download-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). h2. 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: {noformat} 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 {noformat}

    Atlassian JIRA | 1 year ago | Joe Xie [atlassian]
    net.sf.hibernate.MappingException: property does not exist: userName
  2. 0

    h2. Workaround Work around this problem by first restoring the site backup into 5.6 ([link to the archives|https://www.atlassian.com/software/confluence/download-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). h2. 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: {noformat} 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 {noformat}

    Atlassian JIRA | 1 year ago | Joe Xie [atlassian]
    net.sf.hibernate.MappingException: property does not exist: userName
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Hibernate Community • View topic - Dialect does not support identity key generation

    hibernate.org | 4 months ago
    net.sf.hibernate.MappingException: could not instantiate id generator

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.MappingException

      property does not exist: userName

      at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyType()
    2. net.sf.hibernate
      AbstractEntityPersister.getPropertyType
      1. net.sf.hibernate.persister.AbstractEntityPersister.getPropertyType(AbstractEntityPersister.java:1133)
      1 frame
    3. com.atlassian.confluence
      BackupParser.endElement
      1. com.atlassian.confluence.importexport.xmlimport.persister.AbstractObjectPersister.getPrimitivePropertyValue(AbstractObjectPersister.java:45)
      2. com.atlassian.confluence.importexport.xmlimport.persister.HibernateContentPermissionPersister.updateProperty(HibernateContentPermissionPersister.java:67)
      3. com.atlassian.confluence.importexport.xmlimport.persister.HibernateContentPermissionPersister.persist(HibernateContentPermissionPersister.java:43)
      4. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:47)
      5. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:37)
      6. com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:51)
      7. com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:55)
      7 frames
    4. Xerces2-j
      SAXParserImpl$JAXPSAXParser.parse
      1. org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      2. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      3. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      5. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      7. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      8. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      9. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      9 frames
    5. com.atlassian.security
      RestrictedXMLReader.parse
      1. com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
      1 frame
    6. com.atlassian.confluence
      DefaultXmlImporter.doImport
      1. com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:103)
      2. com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:61)
      2 frames