question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wiring into existing spring-boot app fails: "No property findAll found for type..."

See original GitHub issue

Hello Damien, spring-data-jpa-datatables is just what I was looking for. I was about to implement a direct connector between datatables and a spring rest repository, when I found it. I could run the example project and it works just fine. I’ll post an enhancement for easier testing (CORS Headers) later on. I’d like to integrate your approach into an existing app. I added the dependency and the annotation

@EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class) to the Application class.

When I start the application, an exception is thrown: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type Meeting…

In the Interface @Repository public interface MeetingRepository extends PagingAndSortingRepository<Meeting, Long> several method signatures exist, and I added a DataTablesOutput<Meeting> findAll(DataTablesInput input);

The app uses Spring Boot Starter 1.2.4 . Any ideas why the discovery of the repository methods fails?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
shubham-aggarwalcommented, Jan 19, 2017

Just specifying repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class in my Application class did the trick.

2reactions
tomcgncommented, Nov 21, 2015

Hi Damien, Thanks for the quick response. And for the very good work!

Sure, I didn’t miss the inheritance so the reason was something else.

The autowiring of the existing repositories failed, if the application is configured to use @EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class) for all repos. The solution is to create new repos that extend the exisiting ones, in a distinct package - anyways a good idea to keep existing api stable, and have these repositories interfaces extend the DataTablesRespository, as you suggest.

Then, you can specify that package in Application.java @EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class, basePackages = "org.whatever.repository.datatables") Then the differing factory is only applied to the repositories responsible for datatables.

Sorting and paging works fine now. I will continue tomorrow with the search, which does not yet work (it’s supported, right?)

Thanks again for sharing this, it was definitely missing and is worth a mention on datatables.net

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Data JPA - "No Property Found for Type" Exception
Now, when I call the findLatestBoards method in BoardService , "No Property Found" exception is thrown on the line return boardRepository.findAll(request).
Read more >
[Solved]-No property findAll found for type Pairs-Springboot
When you would like to find by Specification you should declare in method name such as Flux<ActivePairs> findBySpecification(Specification specification, ...
Read more >
How to fix Spring Data JPA - "No Property Found for Type class
The problem here is that you are creating FilterRepositoryImpl but you are using it in UserRepository. You need to create UserRepositoryImpl to make...
Read more >
1. Working with Spring Data Repositories
The information in this chapter is pulled from the Spring Data Commons module. It uses the configuration and code samples for the Java...
Read more >
Spring Data for Apache Cassandra - Reference Documentation
Using a unique Spring Data module in your application makes things ... and fail (as the type of addressZip probably has no code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found