Closed e2d2 closed 8 years ago
Can you please attach the new profile?
Saved as .json. media-transfer-profile.txt
You put "requiredValue" : true
for your fields, did you mean "fieldRequired": true
?
requiredValue
is suppose to be a string not a boolean
That will do it. Thanks for the catch!
From: John Scancella notifications@github.com<mailto:notifications@github.com> Reply-To: LibraryOfCongress/bagger reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, February 18, 2016 at 11:42 AM To: LibraryOfCongress/bagger bagger@noreply.github.com<mailto:bagger@noreply.github.com> Cc: Erin Faulder eef46@cornell.edu<mailto:eef46@cornell.edu> Subject: Re: [bagger] New bag profile causes bagger to not open on mac (#22)
You put "requiredValue" : true for your fields, did you mean "fieldRequired": true? requiredValue is suppose to be a string not a boolean
— Reply to this email directly or view it on GitHubhttps://github.com/LibraryOfCongress/bagger/issues/22#issuecomment-185808175.
After adding a new json profile to the bagger profile folder, bagger is unable to open on a mac. The output from terminal is pasted below.
Editing an existing profile to add an additional element, saving it, and then re-opening bagger over-writes the profile with the defaults.
2016-02-18 09:18:36,331 INFO [main] g.l.r.b.d.JSonBagger [JSonBagger.java:52] Using profiles from /Users/Erin/bagger 2016-02-18 09:18:36,361 ERROR [main] g.l.r.b.BaggerApplication [BaggerApplication.java:55] 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.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-2.5.5.jar:2.5.5] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_71] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) ~[spring-beans-2.5.5.jar:2.5.5] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) ~[spring-context-2.5.5.jar:2.5.5] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) ~[spring-context-2.5.5.jar:2.5.5] at org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext(ApplicationLauncher.java:263) ~[spring-richclient-core-1.1.0.jar:1.1.0] at org.springframework.richclient.application.ApplicationLauncher.(ApplicationLauncher.java:159) ~[spring-richclient-core-1.1.0.jar:1.1.0]
at gov.loc.repository.bagger.BaggerApplication.main(BaggerApplication.java:42) ~[bagger-2.5.0-RC3.jar:na]
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.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-2.5.5.jar:2.5.5]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_71]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ~[spring-beans-2.5.5.jar:2.5.5]
... 20 common frames omitted
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.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248) ~[spring-beans-2.5.5.jar:2.5.5]
... 32 common frames omitted
Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at gov.loc.repository.bagger.ProfileField.createProfileField(ProfileField.java:105) ~[bagger-business-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.Profile.getFields(Profile.java:130) ~[bagger-business-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.Profile.createProfile(Profile.java:114) ~[bagger-business-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.domain.JSonBagger.loadProfile(JSonBagger.java:134) ~[bagger-business-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.domain.JSonBagger.loadProfiles(JSonBagger.java:109) ~[bagger-business-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.profile.BaggerProfileStore.initializeProfile(BaggerProfileStore.java:34) ~[bagger-core-2.5.0-RC3.jar:na]
at gov.loc.repository.bagger.profile.BaggerProfileStore.(BaggerProfileStore.java:21) ~[bagger-core-2.5.0-RC3.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_71]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_71]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_71]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_71]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ~[spring-beans-2.5.5.jar:2.5.5]
... 34 common frames omitted
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]