skip to Main Content

java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null – Mysql

`HTTP Status 500 – Internal Server Error Type Exception Report Message Request processing failed: java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception jakarta.servlet.ServletException: Request processing…

VIEW QUESTION

Mongodb – Failed to execute CommandLineRunner

I have a spring boot application that has been up running for months now. Everything was fine until I added this line in the UserRepository that extends MongoRepository: List<User> findAllByUserName(List<String> usernames); Now I get the following error: java.lang.IllegalStateException: Failed to…

VIEW QUESTION

java.lang.NullPointerException: Cannot invoke "com.proj.my.repository.OrderRepository.save(Object)" because "this.orderRepository" is null – Mysql

I want to test my orderService, each order has x cartItems, each cartItem is a product. I managed to do some code, and thought I got it right, but encountered a problem : java.lang.NullPointerException: Cannot invoke "com.proj.my.repository.OrderRepository.save(Object)" because "this.orderRepository" is…

VIEW QUESTION
Back To Top
Search