1,916,508 questions
-1
votes
0
answers
39
views
im trying to get the basic java project from xrpl.org to work with java 25 https://xrpl.org/docs/tutorials/get-started/get-started-java [closed]
I'm getting errors on the pom and don't know how to fix it. I've tried everything i could think of. Can someone please try to do this very simple project with java 25 and see if they can do it without ...
0
votes
0
answers
30
views
Not getting any output from Spring AI MCP server
I am building a skeleton MCP server using Spring AI with the STDIO transport:
pom.xml
<properties>
<java.version>21</java.version>
<spring-ai-starter.version&...
Advice
0
votes
3
replies
60
views
Leetcode does not require me to write the main Function. How do I write the main function for taking in the input?
So I just gave an online assessment round for an intern position which required me to solve a DSA question. I am pretty sure I solved the question using the function correctly but the main function ...
0
votes
0
answers
80
views
Android java ArrayList Object
Trying to educate myself from a sample Android app in Android Studio, I have found an ArrayList<String>.
In the debugging mode, the value(s) of this array is as below (using the view tool of the ...
0
votes
0
answers
51
views
Feign multipart file upload intermittently fails with RetryableException: Incomplete output stream
I’m facing an issue while uploading a file between two Spring Boot microservices using OpenFeign.
task-service generates an Excel file
It sends the file to system-service using Feign (multipart/form-...
Advice
0
votes
10
replies
147
views
How to learn programming
I'm a sophomore majoring in computer science and after trying Codeforces and LeetCode, as well as various YouTube channels and different project tutorials and Codédex, I find myself still not fully ...
Best practices
0
votes
0
replies
47
views
Configuring Spring Boot 3 (Spring MVC & Spring Security 7) for CORS public access (with credentials)
There are lots of good examples for how to configure Spring Boot for CORS online, but it seems to be very hard to find anything with an intersection of:
Using the APIs in Spring Boot 3 rather than ...
Advice
0
votes
2
replies
48
views
What's the Scope of Selenium Testing over the next 5 Year?
I have assigned the role of Java Selenium tester in MNC and right now I'm in training phase for the same. But As the increasing uses of AI I'm confused if this is a right career path or not? If Yes, ...
2
votes
1
answer
72
views
PcapPlusPlus - Create a RawPacket with a byte array
I'm creating an Android app that can capture the internet traffic to analyze later. Through a VPN tunnel, I can get the packets in a byte[] array.
My question is: Is it possible to create a pcpp::...
0
votes
0
answers
37
views
TestNG tests breakup into nested classes
I have TestNG tests with long startup times (they init Spring, a complicated DB setup, etc.). What I now want is to boot up only once and then run many tests in one class.
To keep the test-class from ...
0
votes
0
answers
38
views
How to disable SSL in sonar-cxx plugin when using an HTTP SonarQube server?
I am running the SonarScanner CLI and SonarQube in a Docker container each.
I use the free version of SonarQube so I have added the cxx sonarqube plugin v2.2.2.
The version of the SonarScanner is 12.1 ...
Advice
1
vote
6
replies
78
views
How to solve concurrency in java
I'm struggling with a project "Auction System" in java. I don't know which pattern design or practices are the most efficient to deal with concurrency when placing bid. Is using "...
-5
votes
0
answers
72
views
Java string not reversing correctly using loop [duplicate]
I am trying to write a Java program to reverse a string entered by the user.
Expected Output
Input:
"hello"
Output:
"olleh"
Actual Output:
The output is incorrect or sometimes ...
0
votes
1
answer
77
views
Java program not printing expected output for array reversal [duplicate]
I am trying to write a Java program to reverse an array. My goal is to take an input array and print it in reverse order.
If input is:
1 2 3 4 5
Expected output:
5 4 3 2 1
Actual Output
The program ...
0
votes
1
answer
86
views
Connection pool issue in hibernate 6 spring boot 3 [closed]
I recently migrated my application from Spring Boot 2 with Hibernate 5 to Spring Boot 3 with Hibernate 6 in a testing environment. Since the migration, I encounter issues during high load (overload ...
Tooling
1
vote
4
replies
101
views
IntelliJ or EclipseIDE. Which is better?
If someone is teaching me Java on Eclipse IDE, is it just a waste of time? I used IntelliJ for one year, which according to many people, is one of the best IDEs or at least one of the most popular and ...
0
votes
1
answer
56
views
Could I to develop a dynamic popup of a JCombobox editable, that changes the content while the user insert or remove text?
I have some problems to set the popup of my JComboBox in java 17. I'm developing my app with windowsBuilder and I want to the popup is updating while the user insert o remove text, only appearing the ...
0
votes
1
answer
112
views
reading a "Long" out of bytes and changing endian order
I’m having an issue with reading a Long variable from a binary file in Java.
My code:
Static long extractLong (DataInputStream dis) throw IOException{
byte[] bytes = new byte[8];
dis.read(...
-1
votes
1
answer
63
views
Why do @Async background threads silently fail in Spring Boot on AWS Lambda, while Node.js fire-and-forget works fine?
We have a Spring Boot application deployed on AWS Lambda that makes outbound calls to OCPI partner APIs (EMSP roaming partners). We use @Async for these outbound calls to avoid blocking the main ...
0
votes
2
answers
98
views
How can I replicate this image using Java2d?
I'm trying to replicate this image using java2d, and I've almost done it, but there's a slight difference.
In the original image, there are 4 circles overlapping in the center, but in my output there'...
-1
votes
0
answers
46
views
3D software renderer clipping issue: triangles disappear or have gaps when crossing the near plane (or screen edge) [closed]
I'm writing a software 3D renderer in Java (for learning purposes). I have implemented perspective projection, textures, lighting, Z-buffer, and backface culling. Everything works fine except clipping....
Best practices
0
votes
4
replies
91
views
Is there a cheap way to wait and wake threads in Java?
I am working on a concurrent problem where the critical section is not contested because every thread needs to have a go at some shared resource, but because some thread must, and there can be only ...
0
votes
0
answers
97
views
In backtracking what decides if the next recursive call should move sequentially to the next position/ jump ahead based on the element just processed?
In some problems like permutations, we fill positions one by one, while in others like subsets or partitioning, we move ahead based on the elements we have already chosen. Why do these problems move ...
Advice
0
votes
4
replies
55
views
Android : Migrating to Navigation Rail
I am finally updating my Android Java application to run in Android Studio.
I have seen that the current recommendation is to use a Navigation Rail instead of a Drawer.
However, I have not seen (or ...
Best practices
0
votes
2
replies
60
views
Best practice for passing IDs to other entities?
Am I able to pass the entire User to map the payment Info? Is this a good practice, or is there a better way to do it.
public class User {
private Long userID;
private String name;
//DOC ...
-1
votes
0
answers
64
views
Writing JPA Repository Unit tests [closed]
My learning Spring Boot project consists of the files below. My goal is to write Unit tests that test the UserRepository queries. I've tried different annotations, but never got the test to run. ...
0
votes
0
answers
78
views
How do I use an Object as a filter in a native JPA query?
I have a native query that takes 4 (optional) parameters for filtering. 4 is a bit too many for readability, so I was looking into replacing it with an object. I encountered two separate problems ...
0
votes
0
answers
47
views
Does NewRelic agent cause memory leak in Tomcat 10.1?
Using the newest NewRelic agent 9.1.0, we see a memory leak when re-deploying our web application. The first indication is
07-Apr-2026 08:33:34.983 WARNING [http-1557107106] org.apache.catalina.loader....
Best practices
1
vote
9
replies
149
views
Strategies for bulk-migrating a large Java/JAR codebase and its proprietary dependencies to Node.js/TypeScript
We currently have a Node.js application that delegates specific tasks to a Java application (via a .jar file). We have the full Java source code for this .jar.
We are currently transitioning our ...
0
votes
0
answers
70
views
How to lazily fetch, process each row, and print the results as CSV in jOOQ? [closed]
I currently have code like this:
try (var cursor = query().fetchSize(1000).fetchLazy()) {
cursor.formatCSV(out);
}
Does exactly what I want - lazily fetches (my results are gigantic and would ...
2
votes
2
answers
99
views
Spring Security JWT user becoming null
I'm implementing authentication using Spring Security with JWT.
My login and register endpoints were working correctly before adding JWT. However, after implementing JWT and adding the security filter,...
0
votes
0
answers
32
views
New Relic Java recordMetric not showing custom metric data
I'm working with the New Relic Java agent and trying to record a simple custom metric using recordMetric.
My use case is very straightforward: I want to track something like "transactions per ...
Best practices
0
votes
1
replies
25
views
Should I show a wishlist icon on PLP for each product?
Should I show a wishlist icon on PLP for each product?
A wishlist icon for each product on PDP will require a call to DB to confirm if this product is already added in the wishlist or not.
Otherwise, ...
0
votes
0
answers
33
views
QMetry DELETE API fails with application/json but works with multipart/form-data (Jersey MultivaluedMapImpl error) [closed]
I am facing an issue while triggering a DELETE API from QMetry when the request Content-Type is set to application/json. The same API works correctly for GET and POST requests using JSON.
Backend: ...
Best practices
0
votes
4
replies
65
views
Memory settings for running Maven Builds within Docker
TL;DR: What are the best practices for running Maven builds within containers regarding memory limits?
Longer version:
Our build process utilizes Maven builds within Docker containers. For the sake of ...
2
votes
1
answer
88
views
Building a process with ProcessBuilder from a .py script? [duplicate]
As part of some coursework I'm doing, I need to use ProcessBuilder to simulate an OS process scheduler - with Python scripts as processes. The issue is I can't get my ProcessBuilder to recognise a .py ...
Advice
0
votes
0
replies
36
views
How to get the list of Minecraft's vanilla AttributeModifier UUID?
Help | Java 1.21.11
like this (this is fabric code)
@Override
public void setBaby(boolean baby) {
super.setBaby(baby);
if (baby) {
// remove vanilla baby zombie's speed modifier
...
Best practices
2
votes
5
replies
129
views
Want to write online service for board games as my diploma in University
I`m big fan of board games, and when professor ask what I want to write as a diploma, I make decision fast - service for online board games.
Now I have some questions, which I don't know how to ...
Best practices
0
votes
2
replies
63
views
Infinispan as Hibernate 2LC and Spring Cache
I have a question about Infinispan when its being used with Hibernate as a second level cache, while also being used as a regular cache with Spring.
Specifically, I have an Spring 7 application and I ...
Best practices
0
votes
0
replies
50
views
Sorting with MongoDB Java driver during aggregation pipeline by a Mutated(?) value
I am executing the following query on my MongoDB using the Java driver
private static AggregateIterable<Document> averageVendorTotalSent(MongoCollection<Document> collection) {
return ...
4
votes
1
answer
123
views
Template method return type not matching returned instances
I am having a problem with a static template method in an interface. There is nothing special about the interface but the method declaration is a bit tricky. The code looks like:
public interface ...
-2
votes
0
answers
27
views
Swift Mt To Mx transformation [closed]
I’m currently working on transforming MT messages to MX format, using java prowide library
and I’m having some difficulty identifying how MT fields map to MX tags. If anyone has documentation or ...
Advice
0
votes
8
replies
149
views
How would you describe the Java programming language to a beginner?
I've noticed in my Information Systems course that many people still lack the specific knowledge to program, and don't even understand a new and complex language like Java. We're in our third semester,...
-1
votes
0
answers
82
views
Why does my HashSet allow duplicate objects in Java even when values are same? [duplicate]
I am trying to store unique objects in a HashSet, but it still allows duplicates even though the values are the same.
Here is my code:
import java.util.HashSet;
import java.util.Set;
class Student {
...
0
votes
1
answer
213
views
BufferedWriter Writing Random String as NULL value
I'm working with legacy code, the code was written in java 5 and 6.
Recently they updated the machines where this code is used to use Java 8. They recompiled this old code in JAVA 8 it did not fail ...
-3
votes
0
answers
61
views
What additional JUnit tests could improve coverage for a QuaternaryNumber class in Java? [closed]
I've implemented a QuaternaryNumber class in Java that represents numbers in base 4 (quaternary system). The class extends Number and supports arithmetic operations like add, sub, mul, div, and ...
8
votes
2
answers
214
views
JavaFX ListView programmatic selection scroll only when item is outside visible range
When selecting items programmatically in a ListView, I want the scroll to behave like native keyboard navigation — scroll only when the selected item is outside the visible area. Using listView....
Best practices
0
votes
4
replies
52
views
Synchronizing requests on body property value
Suppose you have a REST server. Spring WebFlux, Hibernate, the usual.
You need to make sure all POSTs with the same body property value are processed sequentially. Say, "slotId": no more ...
-2
votes
0
answers
58
views
OpenHTMLToPDF custom TTF fonts not applied (NotoSansArabic). It falls back to default font
I'm generating a PDF using OpenHTMLToPDF (PdfRendererBuilder) in a Spring Boot app, and my custom fonts (ttf) are not being applied. What am I missing for OpenHTMLToPDF to properly apply custom TTF ...
Best practices
0
votes
9
replies
112
views
Is it better to store data for a modular system in sets of arrays or to use reflection to get the data straight from a class?
I am self-taught, so I apologize if the title uses terms incorrectly.
I am trying to write a Minecraft mod that adds some RPG mechanics to the game.
BUT more importantly, for this question, it ...