java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast or BeanUtils.copyProperties not working

am new to JPA and springboot unable to get the api response when am using @Query param(I try achieve the inner join) Repositoty class: @Transactional(rollbackFor = Exception.class) @Modifying …

how to create client TGT with java cxf

I’m new to the java rest CXF client. I will make various requests to a remote server, but first I need to create a Ticket Granting Ticket (TGT). I looked through various sources but I could not find a …

Searching for issues with Sonarcloud API returns none even though they exist

I am trying to get all the sonar report issues from a branch of a private Sonarcloud project. I do this with the following REST call: https://@sonarcloud.io/api/issues/search?projects=…

MessageDigest NoSuchAlgorithmException in Java

So, I’ve cruised through several Stackoverflow threads and other websites as well whilst trying to find a solution to this. I am working on a school assignment that requires the use of an instance of …

Mapping nested JSON values in a Java class

I can’t figure out how to handle nested JSON values in my Java classes. To make it simple as possible, I created four Java classes with every ‘nested level’. However, I’m trying to have all these …

Spring MVC – Separation of logic RestController and Service

I started using Spring MVC to build my first REST API 🙂 Now I struggle a bit of where to put which logic. I read the following: @RestController: Handles requests, defines the API the user can use @…

How to create a parent child Json response in Spring Boot with a Enum using Java

I am trying to create a json response from a Spring boot application where the name of the enum will be the parent structure and below that all the child will be residing . What i have created is …

Which HTTP status code is correct for Subscription cancel exception?

Which HTTP status code is correct for Subscription Canceled exception? I need to throw an exception when the user tries to accesses a certain page. I checked a few statuses like Payment Required, but …

Passing List in @RequestHeader Restapi

I want to pass list of string in my controller via Request Header @RequestHeader(“list”) final List listOfString. Can this be used. How can I pass list of string in header via …

In Java, how do I mask values of all the matching keys of a JSON, when the structure of JSON isn’t same?

I’m looking for a way to hide/mask the sensitive details of JSON output coming from a response, like account number. All the answers I got over the web requires me to know the JSON structure before …