Category "java"

Android/Java: How to open gallery photo in webview android from html ? "<input type="file" id="file" name="picture" multiple="">"? doesn't work

I created a button in html with the command <input type="file" id="file" name="picture" multiple=""> that allows me to choose a photo in the gallery or t

Spring Boot : Token authentication(bearer) in request headers in rest api when token also comes from calling another api

In my spring boot Application i have a scheduler which calls an API to generate token which expires in 15 min. Time of scheduler is also 15 min. please find bel

How to extract values from a String that cannot be converted to Json

While processing the DialogFlow Response object, I get the below given string as textPayload. If this is a Json string, I can easily convert it to a JSONObject

ElasticSearch - Failed to obtain node locks

I have a single node ElasticSearch Cluster in local. I am unable to start elasticsearch service. Getting this error: [bhatr@LRVCEM27547]~/elasticsearch-6.8.8/b

chip navigation bar animation not works

i used this GitHub library in my code for bottom navigation.chip navigation bar i tried to make it floating up after starting the program.but when run the progr

Intellij can't find java.net.http when compiling with Java 11

I'm trying to get one of my projects ready for Java 11 but for some reason Intellij can't find java.net.http. It isn't underlining it as not found in module-inf

AmazonsS3Client throws UnknownHostException if attempting to connect to a local service (MinIO)

In Short: Using AmazonS3Client to connect to a local instance of MinIO results in a UnknownHostException thrown because the url is resolved to http://{bucket_na

Pi4j to use java with raspberry Pi not working

I am honestly about to just give up, i've tried so many different possibilities, for multiple weeks now, almost a month, of multiple problems. I am a new-ish pr

Serenity BDD Hooks implementation returns error

I am trying to implement some hooks into the serenity BDD implementation with intellij. My hooks file looks like this: package steps; import org.openqa.seleniu

How to convert hex string to byte array in Java

I want to convert an hex string to byte array, I know these type of questions are already asked, I have tried their solution, But these solutions are not workin

How to configure spring to use External LDAP Server

I am learning about Spring Security to LDAP server, right now i am trying to make spring authenticate to ldap server. However, spring always uses the embedded s

Make JTable cells in specific column scrollable

I'm creating GUI in java using swing. I use JTable that looks like this. I need to make cells of last column("Popis") to be scrollable as there will be descript

How to use camera2 with detect barcode

Camera is now deprecated and the recommend is to use camera2, can some one guide me to have any idea how to use camera2 with detect barcode

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing"

I'm using java 11, and Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Enterprise E

How to check if list has more then 3 elements using Java8

I have a method that accepts a list of object. I want to iterate through that list and check if the list has more than 3 elements. If it does, I want to throw e

Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate? for example: import org.springframework.data.jpa.repository.JpaRepository; im

Error [Ljava.lang.Object; cannot be cast to [Ljava.security.cert.X509Certificate when converting an arraylist of X509Certificate to array

I am very new to this ssl and certificates. I have a jks file which consists of some certificates which server trusts. I am trying to read all the certificates

How to test my update method with Mockito

Here is my test Class: @RunWith(SpringRunner.class) @SpringBootTest public class UpdateRestaurantTest { @MockBean private RestaurantRepository restaura

Sending protobuf as JSON in spring-boot

I´m using protobufs with this concrete definition. message Hash { string category = 1; repeated KVPair content = 2; } message KVPair { strin

Trying to get a child key value from a json object saved in an map-variable in sketchware

i have the following json as a get response: { "global": { "name": "Lz Cha0S", "uid": xxx, "platform": "X1", "level": 521,