Category "java"

How to solve (java.lang.IllegalStateException: Not on FX application thread)?

I am working on simple Brick Breaker game on JavaFX. Until now everything was working fine but when I tried to add Label which was updating time it showed up th

Spring Batch - RepositoryItemReaderBuilder with RepositoryMethodReference throws Cannot subclass final class

I'm trying to use Spring Batch RepositoryItemReaderBuilder with RepositoryMethodReference as parameter to provide type-safe way to call repository methods. unfo

Hibernate - Map View to Entity - view is not mapped [SELECT la FROM ListAgent la]

In an effort to power an autocomplete, I resolved to map a PostgreSQL view. I followed a tutorial for this. It seems that it does not work at all : I've always

OpenApi enum with multiple values

I am new to OpenApi and want to define my api with an api.yaml (OpenApi version 3.0.1). My problem is the generated enum just contains the name and not the valu

StringIndexOutOfBoundsException when trying to count 'a's in the entered word in Java

public class methods { public static int howMany(String word) { char character = 'a'; int a = 0; for (int i=0;i<=word.length();i+

I'm using PDFBox to replace text, strange characters

I'm using PDFBox to replace text in a template and there are characters (e.g. a simple J) that the tool recognizes as a special character. Any help to solve thi

Java stream min/max of separate variables

How can I determine both the min and max of different attributes of objects in a stream? I've seen answers on how get min and max of the same variable. I've als

How to replace an user's authentication 'http.formLogin()' with a form that is on another frontend server?

Inside a class that extends WebSecurityConfigurerAdapter, I have this authencitation method. I store my users inside an Active Directory. @Override publ

getOutlineShape is deprecated, is there another method to change the hitbox?

I'm making a block that does not occupy a full block in Fabric 1.18. I've tried the following code as suggested on the Fabric wiki. protected static final Voxel

Java springboot application I have to create in which I have to send requests to multiple endpoint with their schedule time at once

Explanation - I have IP address/port and thier time frequency saved in DB. I have to create service or job that will run on scheduled time. It will read endpoin

How to read data from nested array in Firestore

I have the below structure in my Firestore and I want to read data and store it in ArrayList like I have "amountArrayList" which will read data from the "transa

Create program that read the xml and create Java Objects from it. (something like Spring application context)

Hi there as I mentioned in title I want create program which read xml and create beans(Objects) from it. <beans> <bean id="person3" class="Person"

Put each statement in if-clause on new line in Eclipse

In Eclipse formatter for Java how can I format if-statements like if (x != null && x.getSomething() != null && x.getSomething().getSomet

How to solve java error on Geoserver GSR extension

I have set up a Geoserver instance. Now I need the GSR extension to have an ArcGIS compatible REST API. I installed the extension as described but on Geoserver

How to return all types except a certain type in MongoDB?

Let's say that there is a column called colours and it can have values red, blue, and green. I want to retrieve all rows except the ones where the colour is gre

IBM Script Portlet for WebSphere Portal 7

Anyone knows if Script Portlet can be used for WebSphere Portal 7? I noticed that Portlet exists for IBM/HCL WP 8.5 but cant find for WP 7. The goal is to add s

How to import a bean which comes from a configuration bean conditional on another class?

I'm using a 3rd party dependency in my Spring Boot project (version 2.6.3) which has the following classes: @ConditionalOnProperty(prefix = "spring.cloud.vault"

How to get Count of OneToMany field in JPA Enity?

How can we get the count of OneToMany field of JPA entity as querying count for each parent entity while fetching as a list is costly and there is no way in JPA

How to save collection of user defined type to ScyllaDB with Spring Data Cassandra?

When I try to save entity with a list or set of user defined type, I get error: Failed to convert from type [java.util.ImmutableCollections$Set12<?>] to

Trying to resolve Java issue when running Tabulizer in R

I am trying to extract tables from pdfs in R using tabulizer, and keep getting this error when I use extract_tables. Error in .jcall("RJavaTools", "Ljava/lang/O