Category "java"

How do I create a hot flux that will provide data and replenish itself as needed

Since SecureRandom is slow, I was wondering how to make it so that I have a Flux that I can request the next random number, but it is prepopulated by say 100 it

Injected Bean is null in my quarkus extension

I have a quite simple quarkus extension which defines a ContainerRequestFilter to filter authentication and add data to a custom AuthenticationContext. Here is

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause

Tomcat 9 on Windows 2019 Memory Issue

I'm running an open source application (Apereo Central Authentication Service) on Tomcat 9.0.43 running as a Windows Service. Below is a log file extract showin

What Does MapReactiveUserDetailsService Do in Spring Webflux Security Authentication?

I'm trying to implement Spring Security authentication on Spring WebFlux app. I have implemented Spring Security authentication on Spring Web before. When I rea

Mongo template left join between two queries

In a spring project, I'm using reactive mongodb with mongo template to return a result of type Report class. var res1 = (Flux<Report>) template.find(q

recursion and ram flood: Starting a Gradle Daemon, 1 busy and 6 stopped Daemons could not be reused, use --status for details

I'm using this plugin https://github.com/mozilla/rust-android-gradle, which requires me to add tasks.whenTaskAdded { task -> if ((task.name == 'javaPreCo

How to convert SQSevent to DynamodbEvent in Java

I have an AWS lambda function using DynamodbEvent as input. I have another AWS lambda function using SQSEvent as input. And I would like to convert this SQSEven

How do you call a class's function from it's child button's callback (i.e. click method)?

I have a panel, in which there are a few buttons. Just for simplicity I'll just use one button in this example. I need each of the button's callback (i.e. cli

Using method references as listeners with observer pattern

the usage of method references as listeners in an observer pattern does not work. Example: public class ObserverWithMethodReferenceAsListenerTest { cla

Spring Boot Azure Storage Client yields java.lang.NoSuchFieldError: NOOP_CONFIGURER

I'm trying to create a Spring Boot Application that is able to reach out to Azure Storage. Here are some of the Dependencies I've attempted to declare in build.

Maven Surefire test failed: Unsupported class file major version 61

I am trying to create a project in IntelliJ using Maven, but when running mvn install or mvn test in order to run the simple JUnit tests I wrote, it fails with

Spring Webflux - Database connection metrics

Small question regarding database connection metrics for Spring Webflux (2.6+) web application please. For the SpringBoot (non Webflux) apps, connecting to JDBC

Refresh the datasource on password rotation in SpringBoot Application

Can someone please guide me, how I can refresh the datasource whenever the password is rotated for the database. Basically I don't want any manual step to refre

Jackson serialization/deserialization problems when using @JsonTypeInfo. Can someone explain to me how this is working?

Say I have these classes public abstract class Shape {} public class Circle extends Shape{ private int r; ... } public class Main { public static

Gremlin Java client throws a java.util.concurrent.TimeoutException

We have a AWS Neptune db.r4.large instance which with 2vCPUs can run 4 threads and hence 4 queries maximum at a time. We use the Gremlin Java client to connect

How to compile OpenJDK 11 on an M1 Macbook?

I want to compile the OpenJDK 11 for an M1 MacBook. First, I tried to use the Zulu JDK, but I did not find out a way to compile it. Then, I tried to try compile

Get the callable parm function name in Java

I want to know if is possible to get the name of the class and function (or at least the function) in the callMyFunc method below. I need to print something lik

JSP Image Upload to Database

Below I have a code that should accept a user's uploaded image in the form of an input element and push it to a MySQL Database. I am using Tomcat 9. Why is it n

How to scroll down intro element view with selenium+javascript

Im just new in javascript. I used to work with selenium+java. Now I want to perform scroll using JavaScriptExecutor. How do I make it in javascript code instead