Comments (10)
Hi! I'm afraid I'll need a bit more context to debug that
Did you follow the instructions here? More specifically that line:
@EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class)
Could you share your Benefit (and BenefitRepository) classes please?
from spring-data-jpa-datatables-sample.
OK, inserting @EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class) to the WebAppConfig.java solved my issue.
You can close the issue, but now i have anoter error.
With Ajax call not matching the controller method.
Here is my Controller:
@Controller
@RequestMapping(value = "/Benefit")
public class BenefitController {
@Autowired
BenefitDataTableRepo benefitDataTableRepo;
@JsonView(DataTablesOutput.View.class)
@RequestMapping(value = "/datatable2", method = RequestMethod.GET)
public @ResponseBody DataTablesOutput<Benefit> getBenefits2(@Valid DataTablesInput input){
return benefitDataTableRepo.findAll(input);
}
}
here is my repo:
public interface BenefitDataTableRepo extends DataTablesRepository<Benefit, Long> {
}
here is js function:
var table = $('#table_benefits').DataTable({
'ajax' : '/datatable2',
'serverSide' : true,
columns : [ {
data : 'benefitOid'
}, {
data : 'parameter'
}, {
data : 'type'
}, {
data : 'checked'
} ]
});
});
here is my entity:
@Entity
public class Benefit {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long benefitOid;
@NotNull
private String parameter;
private boolean checked = false;
}
from spring-data-jpa-datatables-sample.
I see you have two @RequestMapping
. Shouldn't the url be /Benefit/datatable2
then?
from spring-data-jpa-datatables-sample.
I see you have two @RequestMapping. Shouldn't the url be /Benefit/datatable2 then?
Yep, i realized that after my comment was sent
Url changed to /Benefit/datatable2 but still not working.
from spring-data-jpa-datatables-sample.
@alesisjoan did you solve your issue? can you debug the request in devtools?
from spring-data-jpa-datatables-sample.
Closing, please reopen if needed.
from spring-data-jpa-datatables-sample.
Hi! I'm afraid I'll need a bit more context to debug that
👼 Did you follow the instructions here? More specifically that line:
@EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class)
Could you share your Benefit (and BenefitRepository) classes please?
Very usefull, thanks very much!
from spring-data-jpa-datatables-sample.
Hi there,
Facing the same issue, please help me out,
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customreProfileRepo': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type DataTablesOutput!
Below is my code
- This is my separate configuration class because I have an already existing class which is invoking base package
@Configuration
@EnableMongoRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class,
basePackages = { "com.base.repo.customer" })
public class DataTableConfig {
}
- A repo class
@Repository
public interface CustomerProfileRepo extends DataTablesRepository<CustomerProfile, String>{
}
- Controller class
@RequestMapping(value ="/customer/list", method = RequestMethod.GET)
public DataTablesOutput<CustomerProfile> list(@Valid DataTablesInput input) {
return customerProfileRepo.findAll(input);
}
from spring-data-jpa-datatables-sample.
@anuragdhiman Hi! Would you be able to reproduce your issue by forking this repo? If you are actually able to reproduce, could you please open a new issue with all necessary details? Thanks!
from spring-data-jpa-datatables-sample.
@darrachequesne Thanks for sharing this. Sure I will try the same and get back!
from spring-data-jpa-datatables-sample.
Related Issues (14)
- jquery.dataTables.min.js is not loading correctly via Webjar? HOT 1
- Hiding entity properties HOT 3
- Unable to run the application HOT 2
- Still error HOT 7
- Jpa Repository HOT 1
- Enum & SearchPanes HOT 1
- How do I use VO replace Entity with DataTablesRepository HOT 1
- Hanle set in DataTablesOutput HOT 1
- Search with column regex=true not working HOT 1
- column with data= null HOT 4
- Implementing custom methods using DataTableRepository HOT 2
- Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean HOT 2
- dropdown-search-improper results HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-jpa-datatables-sample.