![java.lang.UnsupportedOperationException at java.base/java.util.InmutableCollections.uoe](https://fixthebugs.com/wp-content/uploads/2024/03/9ce837bf-d7a2-4147-9017-713fd484d94f-1.jpg)
java.lang.UnsupportedOperationException at java.base/java.util.InmutableCollections.uoe
Problem: Junit returns next error: Solution: Instead of List.of() or Array.asList() or… you have to use new ArrayList(Arrays.asList(…))...
![Enum does not have an accessible constructor](https://fixthebugs.com/wp-content/uploads/2024/03/b9cb0f73-2ff3-4e26-a63a-c3f73fdc0076-1.jpg)
Enum does not have an accessible constructor
Problem: Mapstruct mapper returns next error: Solution: Maybe there is some data that depends on other mapper, if...
![No read accessor found for property in target type](https://fixthebugs.com/wp-content/uploads/2024/03/94fa8a86-8d9d-41e6-871b-2eb8da822908.jpg)
No read accessor found for property in target type
Problem: When you are trying to map nested objects and you are using Mapstruct and Lombok and it...
![pass parameters to @query in JPA](https://fixthebugs.com/wp-content/uploads/2024/03/b70f3a3c-8fe4-438a-90bf-ba2cb8732402-1.jpg)
Two ways to pass parameters to @query in JPA
There are two ways to pass parameters to @query in JPA. First way, using indexed Parameters Second way,...
![Update multiple fields with JPA query](https://fixthebugs.com/wp-content/uploads/2024/03/33f9ead2-7666-40b5-9acf-9b7ffd5a5637.jpg)
Update multiple fields with JPA query
To update multiple fields in DB with JPA you have to use @Modifying and @Query. Here, an example:...
![Could not resolve target entity](https://fixthebugs.com/wp-content/uploads/2024/03/93e30517-08e3-4132-b97f-5ca1ae9c0428-1.jpg)
JPA: Could not resolve target entity
Problem: When you are trying to use @Query and returns next error: Solution: You have to use as...
![java.lang.NullPointerException: Cannot invoke "[Ljava.lang.Class;.clone()" because " .parameterTypes" is null](https://fixthebugs.com/wp-content/uploads/2024/03/ebd842eb-5108-46f7-ba35-aa3b0418183e-1.jpg)
JUnit: java.lang.NullPointerException: Cannot invoke “[Ljava.lang.Class;.clone()” because ” .parameterTypes” is null
Problem: If you are launching JUnit test and returns next error: Solution: The problem is that you are...
![checkTransactionNeededForUpdateOperation exception](https://fixthebugs.com/wp-content/uploads/2024/03/791438e1-ebc6-4061-bac1-5de43f83e451-1.jpg)
JPA: jakarta.persistence.TransactionRequiredException: Executing an update/delete query org.hibernate.internal.AbstractSharedSessionContract.checkTransactionNeededForUpdateOperation
Problem: When you are using JPA and returns next error: Solution: Just add @Transactional at class level of...
![Read information crt file](https://fixthebugs.com/wp-content/uploads/2024/02/6cbb2109-e641-42de-9e16-2f5b22014e0b-1.jpg)
![Mapping of Enums via @Mapping is removed. Please use @ValueMapping instead!](https://fixthebugs.com/wp-content/uploads/2024/02/9ef76922-8107-4bb2-9ab1-2bb2d3d74abf-1.jpg)
Mapstruct: Mapping of Enums via @Mapping is removed. Please use @ValueMapping instead!
Mapping of Enums via @Mapping is removed. Please use @ValueMapping instead!