Announcement Announcement Module
Collapse
No announcement yet.
Unable to insatiate Gemfire cache using Spring-Gemfire intergration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to insatiate Gemfire cache using Spring-Gemfire intergration

    Hi

    I am trying to use Spring - Gemfire integration
    To start I want to create cache object using org.springframework.data.gemfire.CacheFactoryBean
    I am using Spring 3.0, Spring-Gemfire 1.0.0 and gemfire 6.5.0 in my project
    Here is my code to instantiate CacheFacotryBean.
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    
       <bean id="cache" class="org.springframework.data.gemfire.CacheFactoryBean">
          <property name="properties">
             <props>
                <prop key="cache-xml-file">peer-empty-cache.xml</prop>
                <prop key="mcast-port">0</prop>
             </props>
          </property>
       </bean>
    If I try to instantiate context getting error as
    Code:
    Caused by: java.lang.reflect.MalformedParameterizedTypeException
       at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:42)
       at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:35)
       at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:77)
       at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:86)
       at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:122)
       at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
       at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:82)
       at java.lang.Class.getGenericInterfaces(Class.java:794)
       at org.springframework.core.GenericTypeResolver.getTypeVariableMap(GenericTypeResolver.java:151)
       at org.springframework.core.GenericTypeResolver.resolveParameterType(GenericTypeResolver.java:81)
       at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodParameter(GenericTypeAwarePropertyDescriptor.java:109)
       at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:91)
       at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
       at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
       ... 14 more
    As I have just started working on Spring-Gemfire integration,I will be overwhelmed if you can help .

  • #2
    Hi,

    might be a bit late, but I just encountered the same exception while migrating an application from spring 2.5.6 to spring 3.0.5.RELEASE

    In my case, the problem was coming from a transitive dependency in the pom.xml that would still retrieve a spring 2.5.6 jar in the middle of all the 3.0.5 ones.
    Setting all spring module dependencies version to the 3.0.5.RELEASE version in the project pom fixed the issue.

    Comment

    Working...
    X