java.lang.NoSuchMethodError: org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class;

Spring JIRA | Colin McQueen | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    {code} java.lang.NoSuchMethodError: org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class; at org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:307) at org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:302) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:240) at org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:302) at org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:321) at org.springframework.data.cassandra.core.CassandraTemplate.selectOneById(CassandraTemplate.java:282) at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.findOne(SimpleCassandraRepository.java:69) {code} Here is my code that causes the stacktrace above: Service Unit Test: {code} DateTime date = new DateTime(DateTimeZone.UTC).withDayOfMonth(24).withHourOfDay(19).withMinuteOfHour(1) .withSecondOfMinute(0).withMillisOfSecond(0); FooKey key = new FooKey(UUID.fromString("f73f4a00-9d88-11e3-be4b-009c02935f8e"), "2014", date.toDate()); Foo data = service.selectById(key); Assert.assertNotNull(data); {code} The service code: {code} @Service public class FooServiceImpl implements IFooService { @Autowired private IFooRepository repository; @Override public Foo save(final Foo entity) { return repository.save(entity); } @Override public void delete(final Foo entity) { repository.delete(entity); } @Override public Foo selectById(final FooKey id) { return repository.findOne(id); } } {code} Repository: {code} @Repository public interface IFooRepository extends CassandraRepository<Foo, FooKey> { } {code} I checked the source code in GitHub and it is missing that method. Edit: I would like to mention that this error happens on trying to find one entity or trying to delete an entity.

    Spring JIRA | 3 years ago | Colin McQueen
    java.lang.NoSuchMethodError: org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class;
  2. 0

    {code} java.lang.NoSuchMethodError: org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class; at org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:307) at org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:302) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:240) at org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:302) at org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:321) at org.springframework.data.cassandra.core.CassandraTemplate.selectOneById(CassandraTemplate.java:282) at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.findOne(SimpleCassandraRepository.java:69) {code} Here is my code that causes the stacktrace above: Service Unit Test: {code} DateTime date = new DateTime(DateTimeZone.UTC).withDayOfMonth(24).withHourOfDay(19).withMinuteOfHour(1) .withSecondOfMinute(0).withMillisOfSecond(0); FooKey key = new FooKey(UUID.fromString("f73f4a00-9d88-11e3-be4b-009c02935f8e"), "2014", date.toDate()); Foo data = service.selectById(key); Assert.assertNotNull(data); {code} The service code: {code} @Service public class FooServiceImpl implements IFooService { @Autowired private IFooRepository repository; @Override public Foo save(final Foo entity) { return repository.save(entity); } @Override public void delete(final Foo entity) { repository.delete(entity); } @Override public Foo selectById(final FooKey id) { return repository.findOne(id); } } {code} Repository: {code} @Repository public interface IFooRepository extends CassandraRepository<Foo, FooKey> { } {code} I checked the source code in GitHub and it is missing that method. Edit: I would like to mention that this error happens on trying to find one entity or trying to delete an entity.

    Spring JIRA | 3 years ago | Colin McQueen
    java.lang.NoSuchMethodError: org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.data.cassandra.mapping.CassandraPersistentProperty.getActualType()Ljava/lang/Class;

      at org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty()
    2. Spring Data Cassandra - Core
      CassandraTemplate$1.doWithPersistentProperty
      1. org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:307)
      2. org.springframework.data.cassandra.core.CassandraTemplate$1.doWithPersistentProperty(CassandraTemplate.java:302)
      2 frames
    3. Spring Data Core
      BasicPersistentEntity.doWithProperties
      1. org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:240)
      1 frame
    4. Spring Data Cassandra - Core
      SimpleCassandraRepository.findOne
      1. org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:302)
      2. org.springframework.data.cassandra.core.CassandraTemplate.appendIdCriteria(CassandraTemplate.java:321)
      3. org.springframework.data.cassandra.core.CassandraTemplate.selectOneById(CassandraTemplate.java:282)
      4. org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.findOne(SimpleCassandraRepository.java:69)
      4 frames