Closed taylor5053 closed 9 years ago
Can you post your safr-profile.json?
safr-profile.json is as follows:
{
"Source-Organization" : {
"fieldRequired" : true,
"requiredValue" : "San Francisco Maritime National Historical Park",
},
"Organization-Address" : {
"fieldRequired" : true,
"requiredValue" : "San Francisco Maritime National Historical Park, 2 Marina Blvd. Building E, 2nd Floor, San Francisco, California 94123 USA"
}
"Contact-Name" : {
"fieldRequired" : true,
"defaultValue" : ""
},
"Contact-Phone" : {
"defaultValue" : ""
},
"Contact-Email" : {
"defaultValue" : ""
},
"External-Identifier" : {
"fieldRequired" : true
},
"External-Description" : {
"fieldRequired" : true
},
"Bag-Size" : {
"fieldRequired" : false
},
"Bag-Group-Identifier" : {
"fieldRequired" : false
},
"Bag-Count" : {
"fieldRequired" : true,
"defaultValue" : "1 of 1"
},
"Internal-Sender-Description" : {
"fieldRequired" : false
}
}
your json is invalid. Try checking it with http://jsonlint.com/
here is what it should be:
{
"Source-Organization": {
"fieldRequired": true,
"requiredValue": "SanFranciscoMaritimeNationalHistoricalPark"
},
"Organization-Address": {
"fieldRequired": true,
"requiredValue": "San Francisco Maritime National Historical Park, 2 Marina Blvd. Building E, 2nd Floor, San Francisco, California 94123 USA"
},
"Contact-Name": {
"fieldRequired": true,
"defaultValue": ""
},
"Contact-Phone": {
"defaultValue": ""
},
"Contact-Email": {
"defaultValue": ""
},
"External-Identifier": {
"fieldRequired": true
},
"External-Description": {
"fieldRequired": true
},
"Bag-Size": {
"fieldRequired": false
},
"Bag-Group-Identifier": {
"fieldRequired": false
},
"Bag-Count": {
"fieldRequired": true,
"defaultValue": "1 of 1"
},
"Internal-Sender-Description": {
"fieldRequired": false
}
}
Bagger v2.2 and Bagger v2.1.3 throws an error at startup on Windows 7 if a new profile file is added to the profile folder. I added a new profile to the folder named safr-profile.json and ran the Bagger.bat file but got the error message seen below.
Windows 7 stores the profiles in C:\Users\bagger folder. It overwrites the example profiles every time it opens.
Start Up Error
Profile Folder with New Profile
bagger.log Error Excerpt 13:21:53,960 ERROR BaggerApplication,main:52 - RuntimeException during startup org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bagView' defined in class path resource [gov/loc/repository/bagger/ctx/common/richclient-application-context.xml]: Cannot resolve reference to bean 'profiles' while setting bean property 'viewProperties' with key [TypedStringValue: value [profileStore], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'profiles' defined in class path resource [gov/loc/repository/bagger/ctx/common/business-layer-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gov.loc.repository.bagger.profile.BaggerProfileStore]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:940) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369) at org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext(ApplicationLauncher.java:262) at org.springframework.richclient.application.ApplicationLauncher.(ApplicationLauncher.java:158)
at gov.loc.repository.bagger.BaggerApplication.main(BaggerApplication.java:41)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'profiles' defined in class path resource [gov/loc/repository/bagger/ctx/common/business-layer-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gov.loc.repository.bagger.profile.BaggerProfileStore]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:239)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:765)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 19 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gov.loc.repository.bagger.profile.BaggerProfileStore]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:98)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:233)
... 30 more
Caused by: java.lang.NullPointerException
at gov.loc.repository.bagger.Profile.createProfile(Profile.java:87)
at gov.loc.repository.bagger.domain.JSonBagger.loadProfile(JSonBagger.java:201)
at gov.loc.repository.bagger.domain.JSonBagger.loadProfiles(JSonBagger.java:173)
at gov.loc.repository.bagger.profile.BaggerProfileStore.initializeProfile(BaggerProfileStore.java:32)
at gov.loc.repository.bagger.profile.BaggerProfileStore.(BaggerProfileStore.java:23)
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.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83)
... 32 more