Category "java"

Map JSON default tag to java variable

I am consuming a rest service where the incoming JSon Response is something like this "thumbnailUrls": { "small": "skinresources/unpackaged/images/defau

In Hexagonal architecture, can a service rely on another service, or is that tight coupling?

I am creating a banking application. Currently, there is one primary service, the transaction service. This service allows getting transactions by id, and creat

How do I transform an array using Jolt?

I am getting a null value for my transformed object when trying to convert something like this: { "employees": [ { "f_name" : "tom", "l_name" : "smith"

Weblogic Ant JWSC task to generate a webservice war file

I am running a jwsc ant task to generate a war file. It is working fine for me if I add the weblogic.jar to classpath before running the ant script (CLASSPATH=/

JMeter: Calling external classes and methods?

I have a Java test project that I would like to import in my JMeter test so that I can call the existing methods in the test project. I did some research, and c

FCM notification not retrieve when app is closed

I am retrieving the notification from firebase cloud messaging into my android app. but the problem is when my app is opened or in running state in that case on

WindowsBuilder is not working on Eclipse

This is Anas here and I just wonder if one can share his though about windowsbuilder on eclipse. I installed it from help link through selecting SWT, GWT other

How to access gradle test reports from a docker container

I'm using a docker container to build and run my java application and I want to see the test results that would usually be available from build/reports/tests/te

How to access a private field of the super class of the super class with reflection in Java?

In one API I am using I have an Abstract Class (Class A) that has a private field (A.privateField). Class B extends Class A within the API. I need to extend C

Looking for ideas for Multipart Form Handling on Web Service

I'm playing around with writing a web service that runs on Android that handles uploading photos. I am only writing the server, and do not have any control ove

How to merge two arrays in Java?

Its not to concatenate but to merge two arrays so that they become array of name value pairs. firstarray = ["a","aa","aaa"] secondarray = ["b","bb","bbb"] resu

Disable SSLHandshakeException for a single connection

I'm looking for a solution similar to this answer, but much safer. I'd like to disable the certificate validation, but for a single request only (which is all I

How to get link speed programmatically?

I am working on an app and it is almost finished except only one thing: I don't know how to get link speed and place it in the status bar.I am new to Java so if

JUnit5: How to assert several properties of an object with a single assert call?

I want to assert several properties of an object with a single assert call. With JUnit 4 and Hamcrest I would have written something like this: assertThat(pro

Exception in thread "main" java.lang.IllegalArgumentException: input == null

A lot of people have already asked this question, but I can't just solve it. I'm trying to do a 2d Game following this tutorial, now I'm in the sprite character

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec Is this error because of dependencies? I i

log4j writing to console but not to file (Liferay + Tomcat)

I've recently had issues with my Liferay/Tomcat logs getting clogged up from several portlets logging to the same files, which makes it tough to track down issu

Add JavaFX jmods to java --list-modules

Preface: I need to open .jar files which requires Java and JavaFX. I have installed both Java (from Oracle website) and JavaFX (SDK from openjfx website). I ha

how to read a value from Column Name in Excel in Java

How can I read a value related to Specific Column Names with Apache POI in Excel (xlsx). Column Names is my 1st Row of Excel Sheet . value is the row Which hav

setUp method: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:

When I am running Selenium-Webdriver scripts in Eclipse, it works fine. But the same scripts are running in jenkins in server machine, it is giving the followin