Category "java"

Spring Boot: run liquibase migrations without starting app

In Spring Boot, the documentation seems to encourage running migrations on app startup. This is fine, but sometimes app startup may have side effects / depende

Get last modification dates of files in directory in git

I have a folder full of files and I want to get the timestamps of last git update for each of those files. I'd like to get those in a Gradle task. I tried the f

static ScheduledThreadPoolExecutor in CompletableFuture.Delayer

In java-9 the new method completeOnTimeout in the CompletableFuture class was introduced: public CompletableFuture<T> completeOnTimeout(T value, long time

jira multiselect customfield AUI selest2 defined in plugin does not pick any options

I'm completly stuck trying to implement AUI.select2 style multiselect customfield in jira plugin. in main class I just declare the constructor and do not overri

JInternalFrame Issue

I could not use JInternalFrameForm in Netbeans. I did right click on my package and go new but I did not see JInternalFrameForm option.

Getting java.lang.SecurityException - "org.hamcrest.Matchers"'s signer information does not match

I am executing below Rest Assured Program: io.restassured.RestAssured.baseURI ="http://a.b.c.d:9200/e/f"; Response responseNew=null; req

Error while building project using maven [com/sun/tools/javac/tree/JCTree$JCCompilationUnit]

I am trying to use maven to build my java project, but I always get the error message, > Execution default of goal org.projectlombok:lombok-maven-plugin:1.1

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test)

I am facing this issue with maven-surefire-plugin 3.0.0-M4 and Maven versions 3.6.3, 3.6.0 and 3.3.9 with jdk1.8.0_222 (Ubuntu 18.0.4). My pom.xml is as follows

The import org.mockito.Mock cannot be found

I am experiencing a problem I hope you can help with. I want to use Mockito in my Spring Boot w/Gradle project, but STS cannot resolve the dependancy. I have

Spring Kafka : Record listener vs Batch listener

With spring-kafka, there is two types of Kafka listeners. Record Listeners : @KafkaListener(groupId = "group1", topics = {"my.topic"}) public void listenSingl

How to set up java 10 in Eclipse Oxygen?

I am not sure if latest version of eclipse i.e. Oxygen supports java 10 or not. I configured the JRE for java 10 from preferences on my mac machine. Also, I

Upload image to java rest api from .net http client

I am student and on a assignment i was trying to send image from my blazor page to java rest api . As for the api it works perfectly as i tried it with postman

Partition negative and positive in an array in java using shift operator

You will be given an array of n integers, both negative and positive. You need to partition the array into positive and negative numbers. Add all the positive i

How to resolve No ad config issue in android Admob?

Hello I am trying to use Admob ads on my app but ads are not displaying. I am getting this error: "Code": 3, "Message": "No ad config.", "Domain": "com.goog

OAuth2AuthorizedClient is always null @ azure implementation

I am currently try to get the refreshtoken because at a certain time the token will be unvalid and I would like to refresh my accesstoken. Problem is that OAut

How to horizontally merge XWPFTable using POI in Java

I want to horizontally merge columns of the row in a XWPFTable. I tried the answer in this link. How to merge cells (or apply colspan) using XWPFTable in POI

Need to process multiple files in parallel in Spring Integration

I have a SFTP directory and reading files and sending the files for further processing to a ServiceActivator.At any point I need to process them parallely using

Spring Boot Upgrade from 2.3.x -> 2.6.x Breaks mvc forward:

After upgrading From Spring Boot 2.3.x to 2.6.x Forwarding MVC REST Calls doesn't work. We have a controller for /health that returns forward:/actuator/health/.

Is it correct to convert a CompletableFuture<Stream<T>> to a Publisher<T>?

To allow multiple iterations on the resulting stream from a CompletableFuture<Stream<String>> I am considering one of the following approaches: Con

javax.xml.ws.WebServiceException when invoking WSDL service

I was looking to use the Travelport Universal API to develop a Flight Booking System, so i have used this Travelport Developers official link as reference: Get