Category "java"

Failed to launch JVM

I have searched for similar problems on SO but did not find any clues how to resolve this error. Have developed a small console application (running on windows

Generating random character and numbers in java

This is my first post. I am having a hard time writing this program... Write a program that generates a new license plate every time it is executed – one

Can't close JFrame, from click inside JPanel

I have the following situation: I have a JFrame(GridBagLayout) with 3 JPanels in it (headerPanel, bodyPanel, footerPanel); On the bodyPanel I have a login butto

Missing dependency on EmbeddedKafka on integration test with groovy and spock

I've been trying to create an integration test using the embeddedKafka, but I'm getting problem of missing dependency when trying to run it, this is the error:

Oracle 19c compatibility with jdk7

I would like to know if oracle 19c is compatible with jdk 7. I have found out 2 drivers for oracle 19c ojdbc8 : for jdk8, jdk9 and jdk11 ojdbc10 : for jdk10 and

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