We're updating the issue view to help you get more done. 

Cannot upgrade from OpenVPMS 1.4 to OpenVPMS 1.7

Description

When trying to upgrade an OpenVPMS distribution from 1.4 to 1.7, the following error occurs when loading archetypes:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patientRules' defined in file [C:\OpenVPMS\openvpms-release-1.7\bin\..\conf\applicationContext.xml]: Cannot resolve reference to bean 'patientAgeFormatter' while setting constructor argument; nested exception is org.springframework. beans.factory.BeanCreationException: Error creating bean with name 'patientAgeFormatter' defined in file [C:\OpenVPMS\openvpms-release-1.7\bin\..\conf\applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openvpms.archetype.rules.patient.RefreshablePatientAgeFormatter]: Constructor threw exception; nested exception is org.openvpms.componentbusiness.service.archetype.helper.IMObjectBeanException: No node found named patientAgeFormat in archetype party.organisationPractice org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patientRules' defined in file [C:\OpenVPMS\openvpms-release-1.7\bin\..\conf\applicationContext.xml]: Cannot resolve reference to bean 'patientAgeFormatter' while setting constructor argument; nested exception is orgspringframework. beans.factory.BeanCreationException: Error creating bean with name 'patientAgeFormatter' defined in file [C:\OpenVPMS\openvpms-release-1.7\bin\..\conf\applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openvpms.archetype.rules.patient.RefreshablePatientAgeFormatter]: Constructor threw exception; nested exception is org.openvpms.component.business.service.archetype.helper.IMObjectBeanException: No node found named patientAgeFormat in archetype party.organisationPractice at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.supportAbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factorysupport.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84) at org.openvpms.tools.archetype.loader.ArchetypeLoader.main(ArchetypeLoader.java:263) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patientAgeFormatter' defined in file [C:\OpenVPMS\openvpms-release-1.7\bin\..\conf\applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openvpms.archetype.rules.patient.RefreshablePatientAgeFormatter]: Constructor threw exception; nested exception is org.openvpms.component.business.service.archetype.helper.IMObjectBeanException: No node found named patientAgeFormat in archetype party.organisationPractice at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at orgspringframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 17 more Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openvpms.archetype.rules.patient.RefreshablePatientAgeFormatter]: Constructor threw exception; nested exception is org.openvpms.component.business.service.archetype.helper.IMObjectBeanException: No node found named patientAgeFormat in archetype party.organisationPractice at org.springframework.beans.BeanUtils.instantiateClass(BeanUtilsjava:141) at org.springframework.beans.factory.support.SimpleInstantiationStrategyinstantiate(SimpleInstantiationStrategy.java:108) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280) ... 26 more Caused by: org.openvpms.componentbusiness.service.archetype.helper.IMObjectBeanException: No node found named patientAgeFormat in archetype party.organisationPractice at org.openvpms.component.business.service.archetype.helper.IMObjectBean.getNode(IMObjectBean.java:2016) at org.openvpms.component.business.service.archetype.helper.IMObjectBean$NodePropertySet.get(IMObjectBean.java:2044) at org.openvpms.component.system.common.util.AbstractPropertySet.get(AbstractPropertySet.java:263) at org.openvpms.component.system.common.util.AbstractPropertySet.getString(AbstractPropertySet.java:158) at org.openvpms.componentsystem.common.util.AbstractPropertySet.getString(AbstractPropertySet.java:144) at org.openvpms.component.business.service.archetype.helper.IMObjectBean.getString(IMObjectBean.java:275) at org.openvpms.archetype.rules.patient.PatientAgeFormatter.init(PatientAgeFormatter.java:167) at org.openvpms.archetype.rules.patientPatientAgeFormatter.<init>(PatientAgeFormatter.java:93) at org.openvpms.archetype.rules.patient.RefreshablePatientAgeFormatter.<init>(RefreshablePatientAgeFormatter.java:62) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframeworkbeans.BeanUtils.instantiateClass(BeanUtils.java:126) ... 28 more

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

1.7

Priority

Minor