Category "java"

How can you merge the same type entities consecutively using JPA PresistanceContext

I am currently creating a small project to mimic simple bank transactions. Currently there are two types of transactions. Request transaction Transaction is can

What to use instead of org.jboss.security.auth.spi.DatabaseServerLoginModule?

We are switching to new Java 17 and new WildFly 26. Using older Java, we had a custom login module class which extended org.jboss.security.auth.spi.DatabaseServ

GraphQL + Springboot + Http Headers

I'm using these graphql dependencies: "com.graphql-java-kickstart:graphql-spring-boot-starter:12.0.0", "com.graphql-java-kickstart:graphql-java-tools:12

How to call API again when there is Network or Timeout Error in Android Volley Request

I am using a custom common class named APIHelper for Volley JsonObjectRequest for my all activities. I am handling all type of errors here. And setting positive

Java getJSONArray when it is set to null

The problem happens when I'm trying to get children of a comment. If the child key is null, my application crashes and gives me this error: org.json.JSONExcept

Boolean value remains false after the value of the static field involved changes

In my assignment I have to use an enum to make an EnumSet of elements that fit the criteria given. So, the code needs to be as flexible as possible and allow an

Gradle cucumber error in command-line - command 'C:\Java\jdk-17\bin\java.exe'' finished with non-zero exit value 1

When I run cucumber test from IntelliJ terminal commandline and get subject error: λ gradlew cucumber

Send MultiValueMap params as http link key-value values

I have this MultiValueMap with params which I would like to send as http link key-value values MultiValueMap<String, String> map = new LinkedMultiValueMap

Read Array at index in jpa Query

I have a native Query that return a list of objects, i need to pass an array as parameter to the function getAllUsers. @Repository public interface UserReposito

Accessibility Service is malfunctioning

I've been using an Accessibility service for a while now on my app. It used to work fine, but there's this message on the phone at the screen where you enable t

How to Remove Red JFormDesigner Evaluation Text?

I installed JFormDesigner for IntelliJ with an evaluation license to convert some forms from NetBeans, and upon realizing that it put a huge ugly watermark on e

When FileUploadBase.SizeException (FileUploadException) is thrown, it seems the request is repeated (using Commons FileUpload)

I have an Ajax POST call that uploads one or more files to a servlet. In my servlet, I use Commons FileUpload library to manage the uploading file process: priv

Mock a complex api call

I have some problemi understanding spring @MockBean in complex api call: serviceCommunication.callAPI(HttpMethod.POST, Servi

Does Liferay support the "run once" functionality?

So, if we want to run something only at Liferay startup, we can use the technique as described in some other answers here, like this. However, this offers, to e

How to select all items listed in Recyclerview using androidx.recyclerview.selection?

I am using androidx.recyclerview.selection for selecting items in a RecyclerView. I am trying to build an edit fragment in which it pre-populates the old views

How to Overlap Panels in Swing?

I am attempting to have multiple JPanels that can "overlap", also allowing me to perform custom painting. For this I am using a MainPanel, which extends JLayere

GameOver dialog in Android Game

This method must display results when the game ends, but in line final DialogFragment gameResult = new DialogFragment() {...} I have an error "Fragments should

RabbitMQ doesn't show me the queues and exchange created in my Spring consumer and publisher apps

I am trying to create a publisher and consumer apps in spring using RabbitMQ. Every thing works fine and when the publisher sends a message, the consumer receiv

RabbitMQ doesn't show me the queues and exchange created in my Spring consumer and publisher apps

I am trying to create a publisher and consumer apps in spring using RabbitMQ. Every thing works fine and when the publisher sends a message, the consumer receiv

Unable to find the xpath of star using selenium & java

Thank you in advance ! url - https://www.tripadvisor.in/UserReviewEdit-g641714-d1156207-Club_Mahindra_Madikeri_Coorg-Madikeri_Kodagu_Coorg_Karnataka.html i ne