Category "java"

401: Unauthorized Exception occurred with an apache axis client(java) to invoke a webservice(.net) with an NTLM Authentication Technique

I am calling a web service written in .net located remotely running under IIS Server. I created its respective stub using apache axis 1.4 with eclipse IDE an

Mockito.when().thenReturn() doesn't work or returns null

During the test there is a NullPointerException thrown. I tried to debug it and the only thing I worked out was that eventOptional is always null. Just as if Mo

Java azure function not deploying dependencies

My app has a few maven dependencies. I am able to run the app locally as expected. When deployed via mvn clean package followed by mvn azure-functions:deploy, i

clone an existing project in gitLab

First, I was working on a spring project in STS, I created a project in GitLab and commit it to GitLab. Now, I messed up, I deleted the project that existed loc

JPA Repository.findById() returns null but the value is exist on db

I'm developing Spring boot project, using JPA. What I wanna know is repository.findById(id) method returns null, whereas data is available in the DB. Functions

How to use OR condition with TestNG assertions

Is there a way to do assertions with OR with TestNG? This is what I am trying to find: assertEquals(expected, value1 || value2); // Can be any number of valu

How to disable SSL verification for Elasticsearch RestClient v6.7.0 in Java

I'm trying to connect to an elasticsearch instance which is behind a ssh tunnel. Domain of the elasticsearch instance is *.ap-south-1.es.amazonaws.com while loc

Could not read standard output of command 'cmd'

I am getting the below error when I try to execute the 'clean package' maven command. Any ideas why the stream is closed ? However, when I launch the task by it

Reading lines with BufferedReader and checking for end of file

If I have something like this in my code: String line = r.readLine(); //Where r is a bufferedReader How can I avoid a crash if the next line is the end of t

How can I get my data from csv file to DataProvider

I need to take data(username and password) from my csv.file and use it to register some new Users using DataProvider in Selenium. I have made already Reader to

IllegalArgumentException: width and height must be > 0 while loading Bitmap from View

I'm trying to draw on an ImageViewTouch, a library which enables pinch zooming. I'm able to draw over the image using Canvas, but when I zoom the image, the dra

How to set default current date in jpa for mysql

I am trying to generate current date automatically but getting this error You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Selenium DOM is not changed after execution of Angular ng-if condition

we have following code on page which has angular ng-if condition. <p ng-if="!old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</

Velocity template cannot be found in Windows 10

My laptop just got upgraded to windows 10 from windows 7, and a piece of code stopped working. A large application using velocity templates which used to work o

Getting Amazon Cognito Access Token in Java

We've been writing some code to test our endpoints and the authentication process. We use Cognito for authentication, our endpoints require an access token with

Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authorization Required"

I was trying to hit the https url for google api. Using the code below but its giving some errors. but i can hitting one google api http url and its working ve

Aws step functions - Resume from failed step function activity instead of starting a new execution

I created a step function with 4 different activities which run one after other and also integrated to trigger this step function from a java application. Flow

Using log4j.xml, log specific file or package at debug everything else at error

I'd like to setup my log4j.xml file to log specific classes/packages at DEBUG level and the rest at ERROR level. As you can see below I updated the logging lev

Spel not supported on spring annotation @Scheduled.fixedDelayString

I want to configure the fixedDelay in seconds in my properties file, then I want to convert it to millis in @Scheduled annotation. I expected this to work: @Sch

Using maven to output the version number to a text file

I want to generate a zip file that will update an application with maven. The zip will be hosted on a server and I am using the assembly plugin to generate the