Category "java"

Getting exception when trying to add entry to PROTOSTREAM based cache in Wildfly

I want to use an Infinispan cache with a PROTOSTREAM marshaller in my app running on Wildfly 26.0.1. I found the following post on StackOverflow, where both @My

How i can duplicate a record with your dependents in spring boot

In my use case I need to create an endpoint that duplicates a record and its dependents by copying the data from the current record to a new record creating new

How to add eye symbol in JPasswordField?

How can I add an eye symbol in my java application using java swing?

How to connect NodeJS and Java?

I need for my Node application to be able to send and recieve data to/from an already running Java app or to launch Java app from Node. So, is there a way to se

GCP PubSub java client's Publisher - concurrency not working Multi threaded environement

I am trying to consume messages from Kafka and publish them to Google PubSub. We have 4 Kafka concurrent consumer threads and I injected the Google pubsub clien

Selenium RemoteWebDriver Usage Example (How to fix selenium.WebDriverException: chrome not reachable)

Not exactly as Chrome not reachable Selenium WebDriver error selenium.WebDriverException: chrome not reachable selenium.WebDriverException: chrome not reachable

JavaFX setup is not working, because of environment variables possibly

I will be using JavaFX on a project. I am no expert but I did install it once with no major issue or problem. But I switched to a new computer and after trying

GCP PubSub java client's Publisher - concurrency not working Multi threaded environement

I am trying to consume messages from Kafka and publish them to Google PubSub. We have 4 Kafka concurrent consumer threads and I injected the Google pubsub clien

GSON JsonObject and LinkedTreeMap

I noticed there wasn't an easy all-inclusive (POJO-free) way to convert (in GSON) a JsonArray to a List. I found an example that uses a TypeToken and when I tri

Is using @CrossOrigin the same as overriding addCorsMapping() in Spring?

In my controller I currently added the following annotation @CrossOrigin: @RestController @RequestMapping(value = "/dev/test") @CrossOrigin publ

Apache Commons Net FTP does not throw any exception on wrong credentials

I just managed to upload some files to an FTP server using Apache Commons Net FTP. When I use everything as it should be it works fine, I mean, the file uploadi

Vaadin Refer to mainLayout from RouterLayout

I need to create a buffer between the application screens. I think to make a buffer in the mainLayout but I can't access it from the child layers I tried to do

How to call multiple routes sequentially without messing with body

I have something like the following: .from("direct:start") .to("direct:a") .to("direct:b") .to("direct:c"); The issue I have is direct:a modifies t

Slf4j logger log fields from parent class

I have following code: @Slf4j public class Main { @Data public static class AClass { private String title; } @Data public static class BClass extends ACla

How to convert List<Integer> into JSONArray of Integers, using stream() method in Java

I'm trying to find best way to convert List of Integers to JSONArray of org.json.JSONArray library for API call. For that purpose I'm trying to implement stream

Maven dependency : Failed to get sources. Instead, stub sources have been generated by the disassembler

when i'm navigating to a maven dependency class, i get a .class file with this comment on top and no doc is shown : // Failed to get sources. Instead, stub sour

How to call scheduler from Main Class

My application have two schedulers one runs every day at a particular time and another scheduler every day at and interval of 1 hour. I have added the cron exp

Use 'addRealmObjectField()' instead to add fields that link to other RealmObjects

I have a method that creates and update a realm table private static void createOrUpdateModel(RealmSchema schema, Class clazz) { Field field[] = clazz.getDe

Java SpringBoot OpenApi @ApiResponse shows wrong return object

I'm using OpenApi 3 in my SpringBoot project in order to generate a Swagger html page. The dependency in POM.xml : <dependency> <groupId&g

Java immediately instantiated class [duplicate]

Can someone please explain to me how this code works? Specifically, the new Comparator part? It looks like a class definition that's being imm