org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed.

Spring JIRA | Heng Yan | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I am trying to use '{{partitioned-region-template}}' to simplify my configurations. However, when persistence is enabled, SDG is trying to set "PERSISTENT_REPLICATE" to a Partitioned Region. Please see the errors from below attached stacktrace. When persistence is off, there is no issue. Please help to take a look at it. Thanks! {code:xml} <gfe:partitioned-region-template id="PartitionedRegionTemplate" total-buckets="163" copies="1" persistent="true" disk-store-ref="regionDataStore"> <gfe:partition-resolver ref="colocationPartitionResolver" /> <gfe:eviction type="HEAP_PERCENTAGE" action="OVERFLOW_TO_DISK" /> </gfe:partitioned-region-template> <gfe:partitioned-region id="fundRegion" template="PartitionedRegionTemplate" /> {code} Stack Trace: {code:java} Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fundRegion': Cannot create inner bean '(inner bean)#49d67b41' of type [org.springframework.data.gemfire.RegionAttributesFactoryBean] while setting bean property 'attributes'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#49d67b41': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:449) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:423) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:551) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:178) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:304) ... 13 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#49d67b41': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276) ... 28 more Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:101) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1452) ... 32 more {code}

    Spring JIRA | 2 years ago | Heng Yan
    org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed.
  2. 0

    I am trying to use '{{partitioned-region-template}}' to simplify my configurations. However, when persistence is enabled, SDG is trying to set "PERSISTENT_REPLICATE" to a Partitioned Region. Please see the errors from below attached stacktrace. When persistence is off, there is no issue. Please help to take a look at it. Thanks! {code:xml} <gfe:partitioned-region-template id="PartitionedRegionTemplate" total-buckets="163" copies="1" persistent="true" disk-store-ref="regionDataStore"> <gfe:partition-resolver ref="colocationPartitionResolver" /> <gfe:eviction type="HEAP_PERCENTAGE" action="OVERFLOW_TO_DISK" /> </gfe:partitioned-region-template> <gfe:partitioned-region id="fundRegion" template="PartitionedRegionTemplate" /> {code} Stack Trace: {code:java} Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fundRegion': Cannot create inner bean '(inner bean)#49d67b41' of type [org.springframework.data.gemfire.RegionAttributesFactoryBean] while setting bean property 'attributes'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#49d67b41': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:449) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:423) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:551) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:178) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:304) ... 13 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#49d67b41': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276) ... 28 more Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed. at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:101) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1452) ... 32 more {code}

    Spring JIRA | 2 years ago | Heng Yan
    org.springframework.beans.MethodInvocationException: Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed.
  3. 0

    SEVERE: Exception sending context initialized event to listener instance Beans being destroyed immediately

    Stack Overflow | 9 months ago | Sergio Leal
    org.springframework.beans.MethodInvocationException: Property 'passwordEncoder' threw exception; nested exception is org.jasypt.exceptions.EncryptionInitializationException: java.security.NoSuchProviderException: no such provider: BC
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable to setup Hibernate + Spring + mysql + maven

    Stack Overflow | 2 years ago | Cristian Chaparro A.
    org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.Driver]
  6. 0

    Use ucanaccess with Spring DriverManagerDataSource?

    Stack Overflow | 2 years ago | wez
    org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.ExceptionInInitializerError

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.beans.MethodInvocationException

      Property 'partitionAttributes' threw exception; nested exception is java.lang.IllegalStateException: Data policy PERSISTENT_REPLICATE is not allowed for a partitioned region. DataPolicies other than [PARTITION, PERSISTENT_PARTITION] are not allowed.

      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean()
    2. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287)
      2. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
      10 frames
    3. Spring Context
      CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject
      1. org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:449)
      2. org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:423)
      3. org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:551)
      3 frames
    4. Spring Beans
      InjectionMetadata.inject
      1. org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:178)
      2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
      2 frames
    5. Spring Context
      CommonAnnotationBeanPostProcessor.postProcessPropertyValues
      1. org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:304)
      1 frame