Category "java"

is there any way to handle HTTP/2 Goaway received IOException in HttpClient java?

I am making API calls in the application, At some point randomly it throws java.io.IOException: /149.222.1.1:553232: GOAWAY received, using Java 11 environment.

How to use Thymeleaf to make only a simple Java app (without Spring)

I'm following the official Thymeleaf tutorial on its website and I'm currently on the section Executing the template engine. From what I understood, I should al

MongoDb Java- deeper polymorph tree

I have the following polymorphic structure for objects I want to store in MongoDb: InventoryItem (abstract) / \

The presence of : character in filePattern causes Illegal Char error in RollingFileAppender (log4j2) when configuring programatically

In log4j2.xml when defining the RollingFileAppender, it works fine. Programatically its throwing the error. XML file - <RollingFile name="LogToRollingFile"

Unknown initial character set index '255' received from server

During attempt to create HibernateSession application fails with exception: Caused by: java.sql.SQLException: Unknown initial character set index '255' re

Is there a way to convert an Object[] array to char[] array?

class Solution { char[] make(String s){ Stack<Character> st= new Stack<Character>(); for(char c:s.toCharArray()){ if

How to resolve External Control of File Name or Path (CWE ID 73)

I am working on fixing Veracode issues in my application. Veracode has highlighted the flaw "External Control of File Name or Path (CWE ID 73) " in below code.

Firebase notification message no custom sound on Android 11 (legacy)

Notification message received while the app is in background procudes no sound. It is working on Android 8 and 10 but not in 11. The test app is very simple, it

Get realtime data change update when data changes on Firebase Realtime Database

I have written this code to fetch the data. But I want to fetch updates without restarting the activity as data changes in real-time in the database. I want to

Killing a thread or an asynchronous task

let's say I use a jar that IBM has created. Let's say that this Jar has a function that I need but is ultimately build as such: while (true) { System.ou

Hibernate doesn't create tables automatically

I have Maven project with Hibernate/Spring/MySQL. I have basic entity and I want Hibernate to create tables automatically, but Hibernate doesn't create any tabl

Getting the value from the response element using GPath and Rest Assured

I want to get the value of status from my response. So that i can assert it. I'm using rest assured with java & serenity BDD. Response { "locationType":

Does a simple REST project in Spring Boot use the MVC principle?

I need to create a simple project that uses the Model-View-Controller principle and a MySQL database. And I want to use Spring Boot with Spring MVC and Spring D

Unable to open a link in new tab using Actions Class

I am trying to open a link in a new tab using selenium java automation code. Initially i tried with actions class but it wasn't working. Later i tried using the

Unknown DataBinding Class

I am newbie to DataBinding in Android and learning it to my own. I have just enabled the DataBinding in my App Gradle File in the Android Tag as: dataBindin

Click on pop up/ alert to launch web app using selenium

Currently in my tests when i select a button a pop up appears asking me to launch my web application However I cant seem to switch onto this pop up as if its a

Understanding how this recursive method works [duplicate]

Can someone please explain how this method works? I tried adding System.out.print statements but it didn't get me anywhere and I simply cannot

Catch-all exception handling for outbound ChannelHandler

In Netty you have the concept of inbound and outbound handlers. A catch-all inbound exception handler is implemented simply by adding a channel handler at the e

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and