Spring Data with QueryDslPredicateExecutor no property findAll found for type error

Joag

I tried to follow the tutorial in Spring Data JPA with QueryDSL

My version of the code is the following: spring-boot = 1.3.8.release query-dsl = 3.7.4

My entity is the following

@Entity
@Table(name = BatchAPIEntity.TABLE)
public class BatchAPIEntity extends BatchEntity {

    @JsonView(View.API.class)
    @Column(name = KEY_NIT)
    String nit;
}

My Repository is the following

public interface BatchApiRepository extends JpaRepository<BatchAPIEntity,Long>, QueryDslPredicateExecutor<BatchAPIEntity>{}

When I compile and build the code the follow error is show

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type BatchAPIEntity!
    at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:77)
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:329)
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:309)
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:272)
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:243)
    at org.springframework.data.repository.query.parser.Part.<init>(Part.java:76)
    at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:235)
    at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:373)
    at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:353)
    at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:84)
    at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:62)
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:100)
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:211)
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:74)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:416)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:206)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:251)
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:237)
    at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:92)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1641)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    ... 47 common frames omitted

My error is similiar to the given in the following question, but the problem is that it isn't answer

Error in findAll

I tried also this answer but without any good result

https://stackoverflow.com/a/37800554/5192019

Joag

The way that I could solve this problem, after some read is to use QueryDslJpaRepository instead of two separate interfaces as follows:

public interface BatchApiRepository extends QueryDslJpaRepository<BatchAPIEntity, Long> 

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Spring Data with QueryDslPredicateExecutor no property findAll found for type error

分類Dev

Spring Data with QueryDslPredicateExecutor no property findAll found for type error

分類Dev

Spring Data JpaRepository findAll(Iterable <ID> ids)+ findAll(Sort sort)

分類Dev

Hibernate. Property not found on type

分類Dev

QuerydslPredicateExecutorの問題MongoDB-Spring

分類Dev

QueryDslPredicateExecutorを使用したSpring-Data-JPAとコレクションへの参加

分類Dev

Property "bounds" not found in type view controller

分類Dev

Spring Batch : Field or property 'stepExecutionContext' cannot be found

分類Dev

Spring Boot Whitelabel Errorページ(type = Not Found、status = 404)

分類Dev

Spring Security XML Error - cvc-complex-type.2.4.a: Invalid content was found starting with element 'csrf'

分類Dev

EntityGraphが異なるSpring Data JPA findAll

分類Dev

Expected 'property' to be of type string, instead found type object - Dynamoose

分類Dev

FusedLocationProviderClient - type or namespace could not be found (error)

分類Dev

The requested name is valid, but no data of the requested type was found

分類Dev

Spring Boot Error 404 Not Found Hibernate

分類Dev

property then does not exist on type void , A typescript error

分類Dev

Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

分類Dev

Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

分類Dev

Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

分類Dev

PropertyGrid: remove a property of a custom data type only for a specific property

分類Dev

「タイプのプロパティが見つかりません」... MongoDBおよびSpring-DataでQueryDslPredicateExecutorを使用する場合

分類Dev

Sphinx + Oracle : Data source name not found error

分類Dev

R Shiny data not available "Error: object not found"

分類Dev

一般的なSpring Data JPAリポジトリfindAll

分類Dev

Spring DataのfindAllでOrderByを使用する方法

分類Dev

Spring-data-aerospike `findAll(ids)`は結果にNULLを返します

分類Dev

Spring JPA :: No converter found capable of converting from type

分類Dev

Issue executing Zuul proxy in Spring (bean type not found)

分類Dev

Spring Data JPA findAll()またはfindbyId()がSpring Bootで誤った値を返す

Related 関連記事

  1. 1

    Spring Data with QueryDslPredicateExecutor no property findAll found for type error

  2. 2

    Spring Data with QueryDslPredicateExecutor no property findAll found for type error

  3. 3

    Spring Data JpaRepository findAll(Iterable <ID> ids)+ findAll(Sort sort)

  4. 4

    Hibernate. Property not found on type

  5. 5

    QuerydslPredicateExecutorの問題MongoDB-Spring

  6. 6

    QueryDslPredicateExecutorを使用したSpring-Data-JPAとコレクションへの参加

  7. 7

    Property "bounds" not found in type view controller

  8. 8

    Spring Batch : Field or property 'stepExecutionContext' cannot be found

  9. 9

    Spring Boot Whitelabel Errorページ(type = Not Found、status = 404)

  10. 10

    Spring Security XML Error - cvc-complex-type.2.4.a: Invalid content was found starting with element 'csrf'

  11. 11

    EntityGraphが異なるSpring Data JPA findAll

  12. 12

    Expected 'property' to be of type string, instead found type object - Dynamoose

  13. 13

    FusedLocationProviderClient - type or namespace could not be found (error)

  14. 14

    The requested name is valid, but no data of the requested type was found

  15. 15

    Spring Boot Error 404 Not Found Hibernate

  16. 16

    property then does not exist on type void , A typescript error

  17. 17

    Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

  18. 18

    Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

  19. 19

    Spring / Thymeleaf: Property or field cannot be found on null, but still rendering

  20. 20

    PropertyGrid: remove a property of a custom data type only for a specific property

  21. 21

    「タイプのプロパティが見つかりません」... MongoDBおよびSpring-DataでQueryDslPredicateExecutorを使用する場合

  22. 22

    Sphinx + Oracle : Data source name not found error

  23. 23

    R Shiny data not available "Error: object not found"

  24. 24

    一般的なSpring Data JPAリポジトリfindAll

  25. 25

    Spring DataのfindAllでOrderByを使用する方法

  26. 26

    Spring-data-aerospike `findAll(ids)`は結果にNULLを返します

  27. 27

    Spring JPA :: No converter found capable of converting from type

  28. 28

    Issue executing Zuul proxy in Spring (bean type not found)

  29. 29

    Spring Data JPA findAll()またはfindbyId()がSpring Bootで誤った値を返す

ホットタグ

アーカイブ