Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-498

Exception when trying to use PagingAndSortingRepository - findAll not found in (domain object)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Works as Designed
    • Affects Version/s: 2.0 RC3 (Kay)
    • Fix Version/s: None
    • Component/s: Core, Repository
    • Labels:
      None
    • Environment:
      Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
      Ubuntu 17.01
      Intellij IDEA 2017.3EAP
    • Platform:
      Standalone
    • Last commented by a User:
      true

      Description

      When trying to use PagingAndSortingRepository Im getting following exception:
      (btw Attached please find the sample project, just run SpringDataPaginationExampleApplication)

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type Person!
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:740) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
      	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
      	at com.grebski.sdpe.SpringDataPaginationExampleApplication.main(SpringDataPaginationExampleApplication.java:19) [classes/:na]
      Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type Person!
      	at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:90) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:350) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:330) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:283) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324) ~[na:1.8.0_112-release]
      	at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:265) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:248) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.query.parser.Part.<init>(Part.java:81) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.query.parser.PartTree$OrPart.lambda$new$0(PartTree.java:250) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_112-release]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_112-release]
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_112-release]
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_112-release]
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_112-release]
      	at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:251) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.query.parser.PartTree$Predicate.lambda$new$0(PartTree.java:380) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_112-release]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_112-release]
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_112-release]
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_112-release]
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_112-release]
      	at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:381) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:93) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.cassandra.repository.query.PartTreeCassandraQuery.<init>(PartTreeCassandraQuery.java:58) ~[spring-data-cassandra-2.0.0.RC3.jar:na]
      	at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactory$CassandraQueryLookupStrategy.resolveQuery(CassandraRepositoryFactory.java:147) ~[spring-data-cassandra-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$null$0(RepositoryFactorySupport.java:521) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_112-release]
      	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_112-release]
      	at java.util.Collections$UnmodifiableCollection$1.forEachRemaining(Collections.java:1049) ~[na:1.8.0_112-release]
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_112-release]
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_112-release]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_112-release]
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_112-release]
      	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$new$2(RepositoryFactorySupport.java:523) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_112-release]
      	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:514) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:311) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$3(RepositoryFactoryBeanSupport.java:287) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.util.Lazy.getNullable(Lazy.java:141) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.util.Lazy.get(Lazy.java:63) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:290) ~[spring-data-commons-2.0.0.RC3.jar:na]
      	at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean.afterPropertiesSet(CassandraRepositoryFactoryBean.java:75) ~[spring-data-cassandra-2.0.0.RC3.jar:na]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$invokeInitMethods$5(AbstractAutowireCapableBeanFactory.java:1752) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_112-release]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1751) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
      	... 15 common frames omitted
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              rgrebski Radek Grebski
              Last updater:
              Mark Paluch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 1 week, 1 day ago