Category "java"

Facing SSL issue suddenly while calling razorpay api

I am working on a Razorpay payment gateway integration My API was working fine but suddenly I am started getting the error Unable to get local issuer certifica

Finding Arithmetic Mean of Subarrays Efficiently in an Array

I am trying to find number of ways o calculate arithmetic mean of a subarray of an array. It boils down to this; given an array X and an integer S, how many con

Average test score from result array with varying group sizes

I am working on a problem where I have to calculate the average from a bunch of test results with the following criteria. -his program was tested on several tes

Why can't mock static method in Spring condition

this is my code. class ACondition extends SpringBootConditoin { public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata meta

Getting 405 error in OpenAPI swagger page if I put only path variable attributes in a Rest Controller

I am trying to create Swagger documentation using OpenAPI 3.0. I am using spring-boot-starter 1.5.4.RELEASE and springdoc-openapi-ui version 1.4.2 <parent>

Micronaut Security - Set PublicKey for RSASignatureConfiguration

All the examples of how to validate a JWT token that I found in micronaut are using a "secret". They do it this way: micronaut: security: authentication:

KTable-KTable foreign-key join not producing all messages when topics have more than one partition

See Update below to show potential workaround Our application consumes 2 topics as KTables, performs a left join, and outputs to a topic. During testing, we fou

Mockito mock Java @Value with spring boot

Hi I have this simple code for my Spring Boot Project: @Component public class UserRowMapper implements RowMapper<User> { @Value("${bug.value}") p

java.lang.InternalError: platform encoding not initialized when running EXE4J .exe w/ Java14 on PATH

So this error is a weird one... I'm using EXE4J 6 to build a .exe file for my JavaFX Application. This has worked with no issues through Java version 13.0.1. I

Error creating bean with name 'mongoTemplate' defined in class path resource Mongobee

Using the Mongobee for Data Migration creating and error as Error creating bean with name 'mongoTemplate' defined in class path resource Migration configuration

Colored Emojis in Java Swing Labels

I was wondering how to dispaly colored emojis in swing. I have a feeling that the Swing (awt) font engine is unable to do this. I've tried using the windows emo

How to read a file from internal storage or external storage and store the file in a arrayList in android

My requirement is the end-user must be able to upload files into the application from internal or external storage and finally display the name of the file in t

How to fetch the conversation id from a .msg file using MAPIMessage

I'm trying to parse a .msg file. How do I get the conversation id? I'm using org.apache.poi.hsmf.MAPIMessage

Retrofit 2 Response is null even when response code is 200 and response.isSuccessful() is true

My json response file is : { "access_token": "3lfX6-GCJv8uWZE8h8OSDL5eY5oiiInNjLKZTy2ZFxj7Tru4Ounb3jIdPGMe48Ed6QchTGI3il3NxAOTdHe-3hc-1jAsqiCk6Jq_w5DfRESOfj

Electronics Shop

I have been working on this question, and after submitting my code 7 cases passed, however, 9 cases failed. The question link is here of HackerRank : Electronic

How to test logstash Marker in Junit

I have to create a Junit test for my class logging Map<String, Object> mapMarker = new HashMap<>(); mapMarker.put("input_source", "test_input_source

Missing table [rev_info] after bump liquibase version, spring data envers

I have problem with my project after bump liquibase version to 4.9.1. There is error: BeanCreationException: Error creating bean with name 'entityManagerFactor

Kotlin methods accepting inline classes as parameters - how access from Java?

Let's say I have: inline class Email(value: String) and fun something(email: Email) now if I want to call something() from Java I can't. Because any method

Apache HttpClient 5 as transport option in Google Cloud Storage API

When using the Google Cloud Storage API in Java, we can create an instance of Storage using a builder while specifying some transport options, as follows: Stora

Error in reading the Firebase value: pricecode

Please tell me what is my mistake? I'm trying to count the pricecode and shove it into user -> price. But instead, it gives an error or a link, and not the v