Category "java"

Elasticsearch wildcard query in Java - find all matching fields and replace

I want to update all path fields starting with "example/one". Map<String, Object> parameters = new HashMap<>(); parameters.put("old", "example/one")

How to customize HTTP response for WebSocket upgrade request in Spring?

I have a WebSocket endpoint configured like this in my WebSocketConfigurer implementation public void registerWebSocketHandlers(WebSocketHandlerRegistry regist

Git Diff at method level

I am looking at getting information on all the methods/function Added , Deleted and Modified between any two commits Notes - Code Base is in Java and on Github

How to make sure rector netty http client create fix connection to http server

I use bellow code to create reactor netty http client and use this client to send request. ConnectionProvider connectionProvider = ConnectionProvider.builder("l

What does 'PT' prefix stand for in Duration?

I am trying to use the Duration class instead of long. It has superior literal syntax. I like its flexibility, though it looks weird. "PT10S" means 10 seconds

Java 8 Performance Issues In Windows Server 2019

I have recently migrated some scheduled jobs from a Windows Server 2012 virtual server to a new Windows Server 2019 virtual server, and have noticed some notabl

Create a function with a class Player with values "username" set to input, "size" to 50, "x" and "y" to 0

Trying to create a function with a class Player with values "username" set to input and the rest set to numbers. Searched a few websites but the answers weren't

Android kotlin Object Any type mismatch

How to assign kotlin map to java library map. This gives type mismatch error for Object and Any. I need to assign java map variable in a 3rd party java library

java: error: release version 17 not supported

I recently updated to Intellij 2021.1. However, whenever I try to run my program, I get: java: error: release version 17 not supported I have tried snooping aro

pbkdf2-sha256 hash algorithm issue

Help me please! I am trying to hash password using the pbkdf2-sha256 algorithm. Password = "user1", salt = "IFo7KXYswe7Fiu3BoVNOWg =", hashIterations = "27500".

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