尝试从另一个Spring应用程序配置/上下文连接时,Spring Data Cassandra问题

时间:2014-10-25 18:27:06

标签: spring cassandra spring-data spring-data-cassandra

以下是我们在项目中使用的版本:

<spring.version>4.0.1.RELEASE</spring.version>
<spring-data-cassandra>1.1.0.RELEASE</spring-data-cassandra>

尝试从另一个Spring应用程序配置/上下文连接时出现此错误。

Oct 25, 2014 11:17:44 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.mapping.model.BeanWrapper.getProperty(Lorg/springframework/data/mapping/PersistentProperty;Ljava/lang/Class;)Ljava/lang/Object;] with root cause java.lang.NoSuchMethodError: org.springframework.data.mapping.model.BeanWrapper.getProperty(Lorg/springframework/data/mapping/PersistentProperty;Ljava/lang/Class;)Ljava/lang/Object;
    at org.springframework.data.cassandra.convert.MappingCassandraConverter$2.doWithPersistentProperty(MappingCassandraConverter.java:244)
    at org.springframework.data.cassandra.convert.MappingCassandraConverter$2.doWithPersistentProperty(MappingCassandraConverter.java:239)
    at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261)
    at org.springframework.data.cassandra.convert.MappingCassandraConverter.writeInsertFromWrapper(MappingCassandraConverter.java:239)
    at org.springframework.data.cassandra.convert.MappingCassandraConverter.writeInsertFromObject(MappingCassandraConverter.java:233)
    at org.springframework.data.cassandra.convert.MappingCassandraConverter.write(MappingCassandraConverter.java:222)
    at org.springframework.data.cassandra.core.CassandraTemplate.createInsertQuery(CassandraTemplate.java:638)
    at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:526)
    at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:211)
    at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:206)
    at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:59)

2 个答案:

答案 0 :(得分:0)

我已将父POM的JPA版本从1.5.2.RELEASE更改为最新的1.7.0.RELEASE

    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.7.0.RELEASE</version>
    </dependency>

答案 1 :(得分:0)

升级到spring-data-cassandra-1.1.1.RELEASE。这有修复