Category "java"

Character Class Method issues

So I'm currently working on a school assignment which is to design a program that allows the user to enter some text, and then the program checks: The first let

Error creating bean with name 'entityManagerFactory - nested exception is java.lang.NullPointerException

I'm only learning Java and Spring and after several projects/tutorials went well I'm stuck with this error on a new project: org.springframework.beans.factory.

JavaFX app overwriting files while being open causes exception

I have a runnable jar file (with a lib folder housing all the dependency jars). This is located on a network share which anyone that has access can run from. Th

Issues my method to get a 2D circle to move in a circle

OBS! Changed as part of the question has been answered. My math has been fixed due to your help and input, the same with StackOverflowError but I still can get

Problem invoking EJB from with a client that use Java 1.8.0_331

Switching from Java 1.8.161 to 1.8.0_331 the EJB client stopped working. The error message is: Apr 25, 2022 8:34:49 AM org.xnio.ChannelListeners invokeChannelLi

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