Announcement Announcement Module
Collapse
No announcement yet.
spring-data-mongo MalformedParameterizedTypeException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-data-mongo MalformedParameterizedTypeException

    Caused by: java.lang.reflect.MalformedParameterizedTypeExcept ion
    at sun.reflect.generics.reflectiveObjects.Parameteriz edTypeImpl.validateConstructorArguments(Parameteri zedTypeImpl.java:42)
    at sun.reflect.generics.reflectiveObjects.Parameteriz edTypeImpl.<init>(ParameterizedTypeImpl.java:35)
    at sun.reflect.generics.reflectiveObjects.Parameteriz edTypeImpl.make(ParameterizedTypeImpl.java:77)
    at sun.reflect.generics.factory.CoreReflectionFactory .makeParameterizedType(CoreReflectionFactory.java: 86)
    at sun.reflect.generics.visitor.Reifier.visitClassTyp eSignature(Reifier.java:122)
    at sun.reflect.generics.tree.ClassTypeSignature.accep t(ClassTypeSignature.java:31)
    at sun.reflect.generics.repository.MethodRepository.g etReturnType(MethodRepository.java:50)
    at java.lang.reflect.Method.getGenericReturnType(Meth od.java:236)
    at org.springframework.core.GenericTypeResolver.resol veReturnType(GenericTypeResolver.java:98)
    at org.springframework.beans.GenericTypeAwareProperty Descriptor.getPropertyType(GenericTypeAwarePropert yDescriptor.java:126)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.isExcludedFromDependenc yCheck(AbstractAutowireCapableBeanFactory.java:123 4)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.filterPropertyDescripto rsForDependencyCheck(AbstractAutowireCapableBeanFa ctory.java:1211)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1069)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)
    ... 35 more

    configuration:
    <!-- mongo -->
    <bean id="mongoDbFactory" class="org.springframework.data.document.mongodb.S impleMongoDbFactory">
    <constructor-arg>
    <bean id="mongo" class="com.mongodb.Mongo">
    <constructor-arg name="host" value="localhost"/>
    <constructor-arg name="port" value="27017"/>
    </bean>
    </constructor-arg>
    <constructor-arg name="databaseName" value="mydb"/>
    </bean>

    <bean id="mongoTemplate" class="org.springframework.data.document.mongodb.M ongoTemplate">
    <constructor-arg ref="mongoDbFactory"/>
    </bean>

    I am using spring-data-mongo 1.0.0.M3 and spring-data-commons 1.1.0.M1.

    What is wrong? Thanks.

  • #2
    Sorry, it is jar file issue, after clean and rebuild my project, it is working. Just dont mix multiple spring-data/mongo jars.

    Comment

    Working...
    X