net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType

Atlassian JIRA | Gonchik Tsymzhitov | 2 years ago
  1. 0

    When I start to migrate in the log ERROR. {code} 2015-01-22 11:06:50,037 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:76) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:387) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.xml.sax.SAXException: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) 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:108) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:60) ... 32 more Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837) at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:286) at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:207) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49) ... 44 more 2015-01-22 11:06:50,055 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:397) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) {code}

    Atlassian JIRA | 2 years ago | Gonchik Tsymzhitov
    net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType
  2. 0

    When I start to migrate in the log ERROR. {code} 2015-01-22 11:06:50,037 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:76) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:387) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.xml.sax.SAXException: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) 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:108) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:60) ... 32 more Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837) at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:286) at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:207) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49) ... 44 more 2015-01-22 11:06:50,055 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:397) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) {code}

    Atlassian JIRA | 2 years ago | Gonchik Tsymzhitov
    net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType
  3. 0

    h5. Steps to reproduce: # Like a comment on any page in a space. # Make a space or full site backup that doesn't include comments. # Try to import that backup. The full stack trace: {code:none} 2012-12-20 09:35:02,382 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /wiki/admin/importspace/doimportconfluencespace.action | userName: nmason | referer: https://nmason.jira-dev.com/wiki/admin/importspace/importconfluencespace.action | action: doimportconfluencespace com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:71) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:337) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:305) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:110) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:154) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:147) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.doImport(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 $Proxy89.doImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:81) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) 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.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) 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:55) ... 30 more Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837) at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:269) at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:142) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49) ... 42 more {code} h5. Workaround Delete all LikeEntity entries from the XML file - this will remove all Likes and will allow the import to continue. # Open the zip file and edit entities.xml # Search for LikeEntity. You will see <object> entries like this: {code} <object class="LikeEntity" package="com.atlassian.confluence.like"> <id name="id">1900546</id> <property name="content" class="Comment" package="com.atlassian.confluence.pages"> <id name="id">1572927</id> </property> <property name="username"> <![CDATA[ admin ]]> </property> <property name="creationDate">2013-01-04 17:28:25.971</property> </object> {code} # Remove the entire <object> entry, from the opening '<object class = ' up to and including hte '</object>' closing tag # Repeat for all LikeEntity objects found # Reimport the backup. # NB: You may need to clean the half-imported data out first. #- If it is a space, you can do this by removing the space and then re-importing. #- If it is a full site backup and you are restoring it as part of the installation, you would be better off cleaning the home directory and running the setup wizard again. Just stop Confluence, empty the contents of the home directory and restart Confluence. This will start the setup wizard again.

    Atlassian JIRA | 4 years ago | Nick Mason
    com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Creates a new instance of class B which inherits from class A with an existing instance of A. For an exmaple, there are two classes Person and Customer inheriting from Person. The business logic is that a customer is created when a person buys products in the system. In the implementation, the instance of Person has alreay existed and a new instance customer is going to be created with the existing instance of Person. I used the dynamic-insert for class B, but still got such an error: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: test.hiber.ClassB.apro1 at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1269) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:921) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:850) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:772) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:731) at test.hiber.Hiber.createBwithA(Hiber.java:66) ------------------------------------------------------------- the bean sources with XDoclet tags are: public class ClassA { private String objID; private String apro1; private String apro2; public ClassA() { } /** * @hibernate.property * @hibernate.column * name="PRO_1" * not-null="true" * length="128" * @return Returns the apro1. */ public String getApro1() { return apro1; } public void setApro1(String apro1) { this.apro1 = apro1; } /** * @hibernate.property * @hibernate.column * name="PRO_2" * not-null="true" * length="16" * @param apro1 The apro1 to set. */ public String getApro2() { return apro2; } /** * @param apro2 The apro2 to set. */ public void setApro2(String apro2) { this.apro2 = apro2; } /** * @hibernate.id * generator-class="assigned" * * @return Returns the objID. */ public String getObjID() { return objID; } /** * @param objID The objID to set. */ public void setObjID(String objID) { this.objID = objID; } } /** * *@hibernate.joined-subclass * table="QBS_CLASS_B" * dynamic-insert="true" * *@hibernate.joined-subclass-key * column="ClassA_KEY" * */ public class ClassB extends ClassA { private String bpro; /** * @hibernate.property * @hibernate.column * name="BPRO" * not-null="true" * @return Returns the bpro. */ public String getBpro() { return bpro; } /** * @param bpro The bpro to set. */ public void setBpro(String bpro) { this.bpro = bpro; } } ----------------------------------------------- the test code is: public void test() { createClassA(); createClassBwithA(); } public void createClassA() throws Exception { Session s = sessionFactory.openSession(); ClassA a = new ClassA(); a.setObjID("001a"); a.setApro1("property 1 of a"); a.setApro2("property 2 of a"); s.save(a); s.flush(); s.close(); } public void createBwithA() throws Exception { Session s = sessionFactory.openSession(); Transaction tx = s.beginTransaction(); ClassB b = new ClassB(); b.setObjID("001a"); b.setBpro("b property"); s.save(b); tx.commit(); s.flush(); s.close(); }

    Hibernate JIRA | 1 decade ago | James
    net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: test.hiber.ClassB.apro1
  6. 0

    Hibernate Community • View topic - not-null property references a null or transient value

    hibernate.org | 7 months ago
    net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: dk.te.deb.pojo.Player.team

    1 unregistered visitors
    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.PropertyValueException

      not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType

      at net.sf.hibernate.impl.SessionImpl.checkNullability()
    2. net.sf.hibernate
      SessionImpl.save
      1. net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302)
      2. net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954)
      3. net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883)
      4. net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837)
      4 frames
    3. com.atlassian.confluence
      BackupParser.endElement
      1. com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:286)
      2. com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:207)
      3. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46)
      4. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36)
      5. com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49)
      6. com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53)
      6 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:108)
      2. com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:60)
      2 frames