org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distalStoreFast': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists

Spring JIRA | Manuel David | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I get an error when using new GatewaySender API for GemFire 7.0 WAN API with spring-data-gemfire. Here is the stack trace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distalStoreFast': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) at com.vmware.spring.data.test.Server.run(Server.java:82) at com.vmware.spring.data.test.CacheServer.main(CacheServer.java:10) Caused by: java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting(DiskStoreFactoryImpl.java:166) at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:122) at org.springframework.data.gemfire.DiskStoreFactoryBean.afterPropertiesSet(DiskStoreFactoryBean.java:115) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)

    Spring JIRA | 4 years ago | Manuel David
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distalStoreFast': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists
  2. 0

    I get an error when using new GatewaySender API for GemFire 7.0 WAN API with spring-data-gemfire. Here is the stack trace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distalStoreFast': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) at com.vmware.spring.data.test.Server.run(Server.java:82) at com.vmware.spring.data.test.CacheServer.main(CacheServer.java:10) Caused by: java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting(DiskStoreFactoryImpl.java:166) at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:122) at org.springframework.data.gemfire.DiskStoreFactoryBean.afterPropertiesSet(DiskStoreFactoryBean.java:115) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)

    Spring JIRA | 4 years ago | Manuel David
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'distalStoreFast': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "distalStoreFast" already exists
  3. 0

    If i start a gemfire server normally without using spring-data-gemfire, i am able to modify the default diskstore. eg {code:xml} <disk-store name="DEFAULT" allow-force-compaction="true"> <disk-dirs> <disk-dir>/Users/rajiv/kumar/gemfire/</disk-dir> <disk-dir>/Users/rajiv/kumar/gemfire/txn</disk-dir> <disk-dir>/Users/rajiv/kumar/gemfire/putAllIssue</disk-dir> </disk-dirs> </disk-store> {code} But when i try to do the same using spring-data-gemfire {code:xml} <gfe:disk-store id="DEFAULT" queue-size="50" auto-compact="true" time-interval="9999"> <gfe:disk-dir location="/Users/rajiv/kumar/gemfire/loc" max-size="1000000" /> </gfe:disk-store> {code} I get the below error: {code} Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DEFAULT': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:687) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at com.support.pivotal.spring.data.gemfire.examples.CacheServer.main(CacheServer.java:16) Caused by: java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting(DiskStoreFactoryImpl.java:169) at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:123) at org.springframework.data.gemfire.DiskStoreFactoryBean.afterPropertiesSet(DiskStoreFactoryBean.java:120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ... 12 more {code} I am attaching the source code used and the configurations. Any inputs or i am missing anything in the configurations? -- Thanks and Best Regards, *Rajiv Kumar*, _Gemfire/GemfireXD Technical Support Engineer._

    Spring JIRA | 2 years ago | John Blum
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DEFAULT': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If i start a gemfire server normally without using spring-data-gemfire, i am able to modify the default diskstore. eg {code:xml} <disk-store name="DEFAULT" allow-force-compaction="true"> <disk-dirs> <disk-dir>/Users/rajiv/kumar/gemfire/</disk-dir> <disk-dir>/Users/rajiv/kumar/gemfire/txn</disk-dir> <disk-dir>/Users/rajiv/kumar/gemfire/putAllIssue</disk-dir> </disk-dirs> </disk-store> {code} But when i try to do the same using spring-data-gemfire {code:xml} <gfe:disk-store id="DEFAULT" queue-size="50" auto-compact="true" time-interval="9999"> <gfe:disk-dir location="/Users/rajiv/kumar/gemfire/loc" max-size="1000000" /> </gfe:disk-store> {code} I get the below error: {code} Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DEFAULT': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:687) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at com.support.pivotal.spring.data.gemfire.examples.CacheServer.main(CacheServer.java:16) Caused by: java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting(DiskStoreFactoryImpl.java:169) at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:123) at org.springframework.data.gemfire.DiskStoreFactoryBean.afterPropertiesSet(DiskStoreFactoryBean.java:120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ... 12 more {code} I am attaching the source code used and the configurations. Any inputs or i am missing anything in the configurations? -- Thanks and Best Regards, *Rajiv Kumar*, _Gemfire/GemfireXD Technical Support Engineer._

    Spring JIRA | 2 years ago | John Blum
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DEFAULT': Invocation of init method failed; nested exception is java.lang.IllegalStateException: DiskStore named "DEFAULT" already exists

    Root Cause Analysis

    1. java.lang.IllegalStateException

      DiskStore named "distalStoreFast" already exists

      at com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting()
    2. com.gemstone.gemfire
      DiskStoreFactoryImpl.create
      1. com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.findExisting(DiskStoreFactoryImpl.java:166)
      2. com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:122)
      2 frames
    3. Spring Data GemFire
      DiskStoreFactoryBean.afterPropertiesSet
      1. org.springframework.data.gemfire.DiskStoreFactoryBean.afterPropertiesSet(DiskStoreFactoryBean.java:115)
      1 frame
    4. Spring Beans
      AbstractAutowireCapableBeanFactory.initializeBean
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
      2 frames