-
Bug
-
Resolution: Answered
-
Low
-
4.5.0, 4.6.0, 4.7.0
-
None
-
Severity 3 - Minor
-
Issue Summary
Restore from a backup fails with the "org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme" exception.
INFO - Starting plugin system... ERROR - No default permission scheme exists WARN - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'activityItemDataService' defined in URL [jar:file:/home/ubuntu/fecru-4.7.1/fisheye.jar!/com/atlassian/fecru/activityitem/logitem/LogItemActivityItemDataService.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.crucible.spi.services.ReviewService]: : Error creating bean with name 'reviewService' defined in URL [jar:file:/home/ubuntu/fecru-4.7.1/fisheye.jar!/com/atlassian/crucible/spi/impl/DefaultReviewService.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.cenqua.crucible.model.managers.ProjectManager]: : Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reviewService' defined in URL [jar:file:/home/ubuntu/fecru-4.7.1/fisheye.jar!/com/atlassian/crucible/spi/impl/DefaultReviewService.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.cenqua.crucible.model.managers.ProjectManager]: : Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme Related cause: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'backup': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:747) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84) [spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Restore.java:363) [fisheye.jar:?] at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Restore.java:360) [fisheye.jar:?] at com.cenqua.fisheye.ctl.Restore.createApplicationContext(Restore.java:351) [fisheye.jar:?] at com.cenqua.fisheye.ctl.Restore.run(Restore.java:158) [fisheye.jar:?] at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261) [fisheye.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_212] at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) [fisheyeboot.jar:?] at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) [fisheyeboot.jar:?] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reviewService' defined in URL [jar:file:/home/ubuntu/fecru-4.7.1/fisheye.jar!/com/atlassian/crucible/spi/impl/DefaultReviewService.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.cenqua.crucible.model.managers.ProjectManager]: : Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:747) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1546) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] ... Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme at org.hibernate.engine.internal.Nullability.checkNullability(Nullability.java:103) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] at org.hibernate.action.internal.AbstractEntityInsertAction.nullifyTransientReferencesIfNotAlready(AbstractEntityInsertAction.java:132) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] at org.hibernate.action.internal.AbstractEntityInsertAction.makeEntityManaged(AbstractEntityInsertAction.java:141) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:235) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:209) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:152) [hibernate-core-4.2.13.Final.jar:4.2.13.Final] ... ERROR: problem running command java.lang.reflect.InvocationTargetException 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:498) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) Caused by: org.springframework.context.ApplicationContextException: Application Context not initialised. at com.cenqua.fisheye.config.SpringContext.getApplicationContext(SpringContext.java:51) at com.cenqua.fisheye.config.SpringContext.getComponentByClass(SpringContext.java:90) at com.cenqua.fisheye.config.RootConfig.getRepositoryManager(RootConfig.java:601) at com.cenqua.fisheye.config.RootConfig.fullShutdown(RootConfig.java:1288) at com.cenqua.fisheye.ctl.Restore.destroyApplicationContext(Restore.java:356) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:198) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261) ... 6 more
Steps to Reproduce
1. Create a backup file.
2. Perform an import which will fail in the middle of the operation (e.g. a corrupted backup file).
Creating table definitions... INFO - Creating DB schema version 107 using /home/ubuntu/fecru-4.7.1/sql/SQLSERVER2008/schema/tables_107.sql 1 rows written, 0 tables completed. 3 rows written, 1 tables completed. 7 rows written, 3 tables completed. 7 rows written, 4 tables completed. 8 rows written, 4 tables completed. 14 rows written, 5 tables completed. INFO - Shutting down cross-repo lucene index INFO - Shutdown in progress... INFO - Shutting down DB. <<<<<<<< INFO - *** application context closed *** com.atlassian.crucible.migration.ParseException at com.atlassian.crucible.migration.xml.StAXStreamReader$1.getContentAsString(StAXStreamReader.java:138) at com.atlassian.crucible.migration.item.DBImporter$BaseInserter.setValue(DBImporter.java:442) at com.atlassian.crucible.migration.item.DBImporter.importTable(DBImporter.java:180) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:134) at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:191) at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:172) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:187) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261) 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:498) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0xd83c) not a valid XML character at [row,col {unknown-source}]: [1,6298] at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461) at com.ctc.wstx.sr.StreamScanner.reportIllegalChar(StreamScanner.java:2400) at com.ctc.wstx.sr.StreamScanner.checkAndExpandChar(StreamScanner.java:2320) at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2302) at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1493) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2757) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:669) at com.atlassian.crucible.migration.xml.StAXStreamReader$1.getContentAsString(StAXStreamReader.java:135) ... 13 more Restore failed. This may leave your target FISHEYE_INST directory (/home/ubuntu/fecru-4.7.1) in an inconsistent state.
3. Perform import again
INFO - Starting database... INFO - BoneCP - tracking statements enabled for pool [mainPool] INFO - BoneCP - tracking statements enabled for pool [retriablePool] INFO - Database started. INFO - Using synchronous global permission cache reload policy INFO - Starting plugin system... ERROR - No default permission scheme exists <<<<<<<< WARN - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'activityItemDataService' defined in URL [jar:file:/home/ubuntu/mp/fecru-4.7.1-orig/fisheye.jar!/com/atlassian/fecru/activityitem/logitem/LogItemActivityItemDataService.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.crucible.spi.services.ReviewService]: : Error creating bean with name 'reviewService' defined in URL [jar:file:/home/ubuntu/mp/fecru-4.7.1-orig/fisheye.jar!/com/atlassian/crucible/spi/impl/DefaultReviewService.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.cenqua.crucible.model.managers.ProjectManager]: : Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reviewService' defined in URL [jar:file:/home/ubuntu/mp/fecru-4.7.1-orig/fisheye.jar!/com/atlassian/crucible/spi/impl/DefaultReviewService.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.cenqua.crucible.model.managers.ProjectManager]: : Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectManager': Invocation of init method failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme
Expected Results
n/a
Actual Results
Fisheye is unable to start due to Spring bean initialisation error. The below exception is thrown in the log file:
org.hibernate.PropertyValueException: not-null property references a null or transient value: com.cenqua.crucible.model.Project.permissionScheme
Notes
This is caused by an inconsistent database state. Fisheye/Crucible expects a permission scheme, which is normally being created during setup. Because of the fact that backup import failed in the middle, this data is missing in the database.
Workaround
Use an empty database to restore from the backup.
- mentioned in
-
Page Loading...