Category "java"

Extract a value in a json response with a variable

I am trying to return the id of a declared variable from a json file: i want my java code to search for the previous variable in the json response and once it i

Variable Declared Outside of For Loop Vs Inside

//assume there is a java class call Node, and node is an array of Node for(Node i: node){ Node j = i; } Node j; for(Node i: node){ j = i; } Can some

CompletableFuture, run asynchronous code after "join"

I'm facing some trouble after some month only on Javascript/Typescript. For example, let see this snippet: @Test public void testAsync(){ Completabl

Connecting to an SFTP channel via proxy returns com.jcraft.jsch.JSchException: ProxySOCKS5: server returns 2

I'm trying to connect to a SFTP channel throughout a Proxy, per requirements of the customer. The connection should happen with autentication to the final end

Maven project - compilation errors after cloning

I have a maven project that works perfectly fine locally but after I've pushed it to a remote repository on GitHub and cloned it somewhere else (even to a new l

How to get requests path with unresolved variables in Spring WebFlux

I'm trying to get the request's path with unresolved path variables in a WebFilter. I know in SpringBoot Servlet version it is possible to do this by getting re

How to fix [WARNING]: Timed out connecting to Chrome, retrying

I access Websites in a loop via selenium Java based. Some of the sites crash imediately so that i get the error [1618982990.911][WARNING]: Timed out connecting

Need regex which accept only 4 alpha numeric words and accept period, hyphen and underscore in between

I am trying to write a regex to accept only 4 words and in between the words accept special characters like period(.), hyphen(-) and underscore(). Also if I use

Type mismatch: cannot convert from Object Array to int

import java.util.*; public class tryAgain { public static void main(String[] args) { Scanner sc = new Scanner (System.in); //Cre

java.lang.NoSuchFieldError: CLIENT_ENDPOINT for Amazon ECS

I tried to list the ECS clusters using the code as follow: AmazonECS = amazonECS AmazonECSClientBuilder.standard().withRegion(region).withCredentials(new AWSSta

How to fetch genre of a movie using its genre_ids from tmdb api in android

I'd like to use the tmdb api in Android to display the movie's genre, but the problem is that we have to first find the genre id before we can display the genre

NPE: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference

I've this basic app called Navigation that I was trying to make to understand some concepts where there are 2 activities MainActivity and ActivityB MainActivity

Spring boot calling SOAP web service

I am trying to call SOAP web service from Spring boot, but I am having an issue with it. I have auto generated classes from this WSDL with maven-jaxb2-plugin: &

IntellIj not displaying exceptions from @BeforeAll JUnit5

In IntelliJ, with a Springboot project (2.6.6) using JUnit 5, given the following test class, IntelliJ doesn't display exceptions occuring in the @BeforeAll met

WAP to accept a string and print only the words having consecutive letters as same and number of occurrences [duplicate]

I was solving this question(the title) and I cant find the mistakes present so please help Input : The buffalo is stuck in a soggy field and

Using PowerMockito with ArgumentCaptor

I simply try to test the following part of my service method: if (isDeleted) { LoggingUtils.info("Deleted. ingredientUuuid: {}", ingredient.getUuid()); } I

How to refactor Java classes in a maven project outside of an IDE

Imagine you have an maven project that compiles fine but lacks in a proper use of packages, because all Java/classes reside in the same package. Is there a tool

Make Log4J2 Async Logger library log messages whenever it drops any log event

I am working on enabling Async logger with our service. We have observed that whenever there is an excessive logging, async logger starts blocking application t

convert complex nested json array using jolt expression in nifi

I have a complex Json where i wanted to flatten the Json using Jolt or any other ways to flatten in Nifi is also fine can anyone please help to flatten the belo

App Crashes when Room DB Entity Class object boolean value is changed to false

I have a Room DB setup in my app and it was working well until recently when the app started crashing. It happens that I have a boolean value as a field in the