cannot startup on clean install (persistence config issues)

Issue #185 new
adamb created an issue

I tried installing the latest version of JHOVE2, but am getting errors on startup. I've followed the installation instructions to set the environment variables and tried both "persistence" options, but get the following stack-trace errors. Is it possible there's an issue that conflicts between the XML config and the bean?

08:54:00,453 [main] WARN  TypeConverterDelegate : PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory!
Can't instantiate properties: persistence
org.jhove2.core.JHOVE2Exception: Can't instantiate properties: persistence
    at org.jhove2.config.spring.SpringConfigInfo.getProperties(SpringConfigInfo.java:202)
    at org.jhove2.persist.PersistenceManagerUtil.createPersistenceManagerFactory(PersistenceManagerUtil.java:71)
    at org.jhove2.app.JHOVE2CommandLine.main(JHOVE2CommandLine.java:133)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BerkeleyDbPersistenceManager' defined in file [/Users/abrin/Downloads/jhove2-2.1.0/config/spring/persist/jhove2-persist-config.xml]: Cannot resolve reference to bean 'StoreConfig' while setting bean property 'storeConfig'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'StoreConfig' defined in file [/Users/abrin/Downloads/jhove2-2.1.0/config/spring/persist/jhove2-persist-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowCreate' of bean class [com.sleepycat.persist.StoreConfig]: Bean property 'allowCreate' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    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.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
    at org.jhove2.config.spring.SpringConfigInfo.getContext(SpringConfigInfo.java:288)
    at org.jhove2.config.spring.SpringConfigInfo.getProperties(SpringConfigInfo.java:198)
    ... 2 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'StoreConfig' defined in file [/Users/abrin/Downloads/jhove2-2.1.0/config/spring/persist/jhove2-persist-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowCreate' of bean class [com.sleepycat.persist.StoreConfig]: Bean property 'allowCreate' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    ... 21 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'allowCreate' of bean class [com.sleepycat.persist.StoreConfig]: Bean property 'allowCreate' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
    ... 32 more

Comments (3)

  1. Spike

    I am experiencing the same problem. It is preceded by a large number of deprecation warnings that look like this:

    22:41:30,109 [main] WARN TypeConverterDelegate : PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory!

    I am running Java 1.8.0 on Windows 10, 64 bit.

  2. Spike

    OK, I got this working using a Java 1.6 JDK. Java's famed reputation for backwards compatibility seems to have fallen short.

  3. Log in to comment