Class X cannot be cast to class Boolean (X is in unnamed module of loader 'app'; Boolean is in module java.base of loader 'bootstrap

I noticed that when others are getting this problem, it is because they are trying to cast objects. I am not trying to cast. Furthermore, I am trying to ask if an object exists in a data table using Spring Boot repository. The following issue is occurring: What is the issue exactly? The model: @Entity… Read More Class X cannot be cast to class Boolean (X is in unnamed module of loader 'app'; Boolean is in module java.base of loader 'bootstrap

javax.persistence.EntityNotFoundException: Unable to find kg.library.spring.library_spring.entity.Author with id 10000001

I’m new to Spring and I’m probably making the dumbest mistake, but I can’t solve this problem for more than 2 hours. According to the video tutorial, I did Pagination, I did it exactly like his, but he did not have relationships between entities. I think the error is in a one-to-one relationship between Author… Read More javax.persistence.EntityNotFoundException: Unable to find kg.library.spring.library_spring.entity.Author with id 10000001

How do I fix "Could not autowire. No beans of 'MyRepository' type found"?

I have this hierarchy in my project: ▼ server ▼ myproject ▼ src ▼ main ▼ java ▼ rest ▼ repository Ⓘ MyRepository ▶ resources ▼ test ▼ java ▼ rest Ⓒ MyRepositoryTest This is the MyRepository interface: public interface MyRepository extends MongoRepository<String, Integer> { } This is the MyRepositoryTest test class: @ExtendWith(SpringExtension.class) public class… Read More How do I fix "Could not autowire. No beans of 'MyRepository' type found"?