Announcement Announcement Module
Collapse
No announcement yet.
shortcut attribute in client-region element causes exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • shortcut attribute in client-region element causes exception

    Hi,
    I am using spring-gemfire 1.1.0. I am experiencing a NullPointerException during initialization. My investigation shows it is caused by using "shortcut" in my client-region definition.

    Here is my bean definitions:

    Code:
    <gfe:client-cache properties-ref="gf-props" pool-name="locator-pool" />
    <util:properties id="gf-props" location="classpath:config/gemfire.properties"/>
    	
    <gfe:client-region id="myregion" shortcut="PROXY"/>
    	
    <gfe:pool id="locator-pool" subscription-enabled="true">
    	<gfe:locator host="myhost" port="myport"/>
    </gfe:pool>
    Here is the exception at startup:
    Code:
    ...
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myregion': Invocation of init method failed; nested exception is java.lang.NullPointerException
    	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:197)
    	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)
    	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)
    	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549)
    	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)
    	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)
    	... 56 more
    Caused by: java.lang.NullPointerException
    	at com.gemstone.gemfire.cache.client.internal.ClientRegionFactoryImpl.<init>(ClientRegionFactoryImpl.java:41)
    	at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.createClientRegionFactory(GemFireCacheImpl.java:3840)
    	at org.springframework.data.gemfire.client.ClientRegionFactoryBean.lookupFallback(ClientRegionFactoryBean.java:95)
    	at org.springframework.data.gemfire.RegionLookupFactoryBean.afterPropertiesSet(RegionLookupFactoryBean.java:59)
    	at org.springframework.data.gemfire.client.ClientRegionFactoryBean.afterPropertiesSet(ClientRegionFactoryBean.java:69)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$6.run(AbstractAutowireCapableBeanFactory.java:1504)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1502)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
    	... 68 more

  • #2
    Yeah. This is a bug. Download Spring Gemfire 1.1.1 and it's fixed now.

    Comment

    Working...
    X