Category "java"

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

How to resolve XSRF Cross-Site Request Forgery (CSRF) in API controller after SAST Checkmarx

I have done the scan my project java spring boot with Checkmarx tool. The tool found about 23 XSRF occurrences with Medium severity. The issue found is marked o

Spring Cloud Gateway - custom 404 error message when route is not found

I have a basic Spring Cloud Gateway app that is configured with YAML: server: port: 8080 logging: level: reactor: netty: INFO org: spri

How reverse data in model class

I use firebase ui realtime database to fetch data in RecyclerView and i use model class and i need to show the latest item firest i try to use Collections.rever