1,918,271 questions
Tooling
0
votes
4
replies
71
views
Is there a Database First approach in Java like Entity Framework in C#?
I’m used to working with a Database First approach in C#. I design my database schema (often with MySQL Workbench) and do a forward engineering, then generate my C# models using Entity Framework’s. ...
-12
votes
0
answers
72
views
what is error in this code ,code get error when i submit in the leedcode [closed]
You are climbing a staircase. It takes n steps to reach the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
class Solution {
public int ...
0
votes
0
answers
56
views
Spring Security 3.1.4 requestmatchers with Pathvariable
I have an unclear situation. I'm using a controller with any endpoints. I have a two methods with Get endpoints /short and /{idOrCode}. Pathvariable is a String type. Endpoint with this pathvariable ...
Advice
0
votes
2
replies
58
views
why java stream api is one time use but reactor's publisher not?
why can we subscribe as may as we want from reactor publisher but just one time from java stream api?What reason is there for stream to be one time use?
0
votes
0
answers
46
views
How to route messages from a single JMS producer to one of multiple MDBs based on conditions?
I have a JMS-based application setup where one application(3rd party component with no code level access, but configurable) acts as the only message producer. This producer sends messages to the ...
Advice
0
votes
1
replies
40
views
BridgeLink 4.6.0: How to validate XML against XSD (with dependent imports) using Lookup Manager? Java access removed
I am working on BridgeLink 4.6.0, and I need to validate XML files (CCD/CCDA) using XSD schemas.
Earlier versions of BridgeLink allowed Java access inside JavaScript (e.g., Java.type, Java.extend, ...
Advice
0
votes
4
replies
78
views
Bruce Eckel : Constructor is a static method
Reading through the masterpiece Thinking in Java, Bruce Eckel in many location mentioned that the constructor is a static method. I can't find any article or reference supporting this idea, even I ...
-4
votes
0
answers
79
views
Why does Vscode still give me package not found error with Weka after referencing the JAR file in classpath? [closed]
This is my MRE.
Here is how my project is structured
Project structure here
Settings.json file
{
"java.project.referencedLibraries": [
"lib/weka.jar"
]
}
Main.java
import ...
-2
votes
0
answers
34
views
Flask/Jinja2 Error: Custom Template Filter Not Found [closed]
Why does my Flask app not recognize the custom filter I created?
Advice
0
votes
2
replies
55
views
Apache Ignite 3.0
I am newbie to apache ignite
Is it possible to connect using IgniteClient to the node started in embedded mode?
anyone has a example program to start apache ignite 3.0 in embedded mode with 2 nodes on ...
0
votes
0
answers
48
views
How to fix "ClassNotFoundException" when running Spring Boot jar built with Maven? [closed]
I built a Spring Boot application using Maven, and the project compiles without any errors. However, when I run the packaged jar using : java -jar target/myapp-0.0.1-SNAPSHOT.jar I get the following ...
0
votes
0
answers
84
views
Declaring a variable final in Java, and then setting its value in one of a (short) sequence of if statements [closed]
If you could settle this stylistic / best practices discussion between me and a coworker, it would be very thankful.
I'm working on a significantly old Java codebase that had been in use for over 20 ...
Advice
1
vote
1
replies
60
views
Custom overlay when detecting device recording
I am trying to make a custom overlay for my application that will hide the screen if any screen share or unauthorized recording of my app is running.
The problem is, that I am trying to avoid using ...
0
votes
1
answer
58
views
How to open/close debug port from running Java application
What we are already doing is that JVM can respawn itself from the last own shutdown hook running. It strongly depends on proper closing of all resources and ports. And here comes the problem - all ...
1
vote
1
answer
77
views
Reading and Writing CustomStructType with Eclipse Milo OPC-UA
I am new to OPC-UA and trying to use Eclipse Milo to read and write Objects but I am getting the following Error:
org.eclipse.milo.opcua.stack.core.UaSerializationException: no codec registered for ...
-3
votes
0
answers
72
views
Is there a ready-made Java/Spring library with a predefined list of popular games for a dropdown? [closed]
I’m building a Java + Spring Boot application where users need to select a game from a dropdown menu.
Before I start building and maintaining the list manually, I’d like to know:
Is there any existing ...
1
vote
3
answers
105
views
“String value length exceeds maximum allowed” when uploading large file in JSON
I'm building a Spring Boot application where I'm trying to upload files or large content through a REST endpoint. The request is being rejected by Spring Boot with this warning:
...
Advice
0
votes
2
replies
45
views
How to retry sending a message to AWS SQS in Spring Boot, and then send it to a DLQ if all retries fail?
I am working on a Spring Boot 3.5.0 application that publishes messages to an AWS SQS FIFO queue.
My requirement is:
When sending a message to SQS:
If it fails (network error, AWS error etc.), the ...
1
vote
1
answer
43
views
Self-contained java annotation-processing with gradle
I am reading into java compile-time annotation-processing.
I can easily process annotations manually on the commandline, using
javac -d . MyAnnotation.java
javac -d . MyAnnotationProcessor.java
javac -...
-7
votes
0
answers
68
views
Acessing index by id. JAVA [closed]
How Output do I access the element index/id in the right way? Because I put 101 and it goes to 102 then I fixed it I put -1 on the scanner, then when I put 101 it access 100.
Please help
System.out....
Advice
0
votes
3
replies
94
views
Adapting stockfish chess engine in JAVA Application
I have written a java code that replicates a chess game. For UI i have used Vaadin. I'm trying to integrate stockfish to my code.
but from the below links
link 1
link 2
it seems like i have to run a ...
0
votes
0
answers
44
views
MultiResourceItemWriter does not work with transactional StaxEventItemWriter
I configured a StaxEventItemWriter like this:
@Bean
public StaxEventItemWriter<Foo> fooWriter() {
return new StaxEventItemWriterBuilder<Foo>()
.name("fooWriter")
...
2
votes
1
answer
47
views
Jooq get sequence increment
Maybe there's an easier way to get the Increment with JOOQ?
This one looks more like a crutch:
int increment =
Optional.ofNullable(CUSTOMER_ID_SEQ.getIncrementBy())
.map(Field::getName)
...
1
vote
0
answers
43
views
How do I get cloudwatch agent to send jmx metrics to cloud watch in ECS
I'm needing someone who actually has this working to weigh in as I'm really struggling to get this running...
Here is my task definition in full:
Superfluous and irrelevant bits have been removed.
{
...
0
votes
1
answer
65
views
Problem with injecting value to the static variable
With the entered code here, I am trying to build a project on springboot. I am using AES encryption in my project. I am keeping the password(key) of AES in the application properties. The variable ...
Advice
0
votes
1
replies
165
views
How to authenticate WebSocket connection when access_token is stored in HttpOnly cookies? (Spring Cloud Gateway + STOMP)
I’m building a WebSocket-based microservice architecture using Spring Cloud Gateway and STOMP WebSockets.
Users log in through the frontend, and the backend sets:
access_token (HttpOnly, Secure, ...
-1
votes
0
answers
64
views
Jenkins Docker Node error 400 Bad Request [closed]
My jenkins container start command:
docker run --name jenkins --restart=on-failure --detach \
--network jenkins --env DOCKER_HOST=tcp://docker:2376 \
--env DOCKER_CERT_PATH=/certs/client --env ...
-4
votes
1
answer
57
views
Tiktok fetch an access token using an authorizaiton code problems in java spring boot
I am trying to exchange my authorizatoin code for an access token. I keep getting a "request parameters are malformed" error. I can curl the endpoint just fine but for some reason I can't ...
-1
votes
1
answer
44
views
Spring Boot 3.5.7 with newrelic agent [closed]
I have a Spring Boot application on version 3.5.6 and the New Relic agent is logging the application data without any problems. After updating Spring Boot to version 3.5.7, the application logs ...
-1
votes
0
answers
37
views
How to handle non-numeric input when using scanner.nextInt() in Java [duplicate]
I’m learning Java and testing basic input handling.
I wrote the following simple program:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner ...
0
votes
1
answer
56
views
Cannot make Apache Java Cassandra Driver talk to Azure Cosmos
I have an existing application which uses Apache Cassandra, and I am attempting to check its compatibility with Azure Cosmos DB for Apache Cassandra
My application uses a recent 4.x version of the ...
1
vote
1
answer
49
views
WildFly Undertow UT000173: Invalid control character [250] in cookie - persists
I'm experiencing a persistent cookie corruption issue with my Java EE web application deployed on WildFly 37.0.1.Final. The error appears immediately when accessing the application URL, even after ...
0
votes
0
answers
24
views
KeyCloak Server LOGIN_ERROR when accessing server on Windows
Running KeyCloak 26.4.2 or 26.4.5 and jdk-21 on Windows 10.
// script to generate and install certificate
function Generate-Certificate{
$keycloakInstallationDir = "C:\PathToCertificate&...
Best practices
0
votes
5
replies
53
views
Using CheckerFramework (or something else) for detecting easily-swappable-parameters on methods?
I'm having a method that accepts, for example, two long primitives. How can I add checks to prevent the accidental swapping of parameters?
Something like this should be detected.
public void ...
0
votes
2
answers
75
views
(Shell Sorting) Applying Ciura's gap sequence (or some other optimal sequence formula)
I've been trying to teach myself various sort methods just for the sake of being able to use them in the future and right now I've been teaching myself about shell sorts. I understand the way shell ...
0
votes
0
answers
28
views
Payara 7.2025.1 + payara-micro-managed + Arquillian + JUnit 5 - tests always pass outside container
I’m using Payara 7.2025.1 with payara-micro-managed, Arquillian, and JUnit 5. When I run my tests, a Payara Micro instance starts and deploys correctly, but it seems that the tests themselves are ...
0
votes
0
answers
44
views
Swagger in springboot3- No API Definition Provided
I have a spring boot 3 application and I have added springdoc-openapi dependency ie
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-...
Best practices
0
votes
2
replies
43
views
Best way to merge Keycloak data and Application data
I’m developing an application in which login and roles are entirely handled by Keycloak. My Java backend has an application database that also contains additional user business data. I’ve been asked ...
5
votes
0
answers
136
views
Why does the shuffle-found trigger order for a TimSort comparator contract violation *not* reliably reproduce the error when manually tested?
Background:
I'm debugging a Java sorting setup where I found a faulty Comparator already (violates the contract).
My goal is to implement a test case which provokes the well-known
java.lang....
0
votes
0
answers
65
views
Kafka producer not able to reconnect to pipeline on restart
System is on two site, facing issues on resiliency so using circuit breaker. When I am on close state then sending message to the primary site on call back on secondary site both are using different ...
-3
votes
0
answers
82
views
Entering text with no dependency on current keyboard layout
If a GUI test must involve entering text in a text field, a convenient shortcut is robot.enterText(..) (available in both FEST and its fork, AssertJ Swing).
I was under the impression the utility is ...
1
vote
0
answers
37
views
Micrometer Tracing: TraceId changes when request passes through filter in Spring Boot + Tomcat
I'm using Spring Boot 3.5.7 with Micrometer Tracing (OpenTelemetry bridge) to add a traceId to my logs. I have a REST endpoint and a custom filter like this:
@RestController
@RequestMapping("/api/...
0
votes
0
answers
25
views
Can I create custom JS loader for in memory bundle to be passed in ReactInstanceManager? [closed]
I'm working on implementing dynamic bundle loading for React Native. Currently, ReactInstanceManager.Builder only supports asset:// and file:// protocols for loading JavaScript bundles.
I need to ...
Advice
0
votes
3
replies
104
views
Explicit class reference during static initialization not allowed. Why?
Note. I hope "why" questions do fall into the "other" category.
This compiles.
class MyClass {
private static final String STRING;
static {
STRING = "abc&...
0
votes
0
answers
85
views
Google Play warning about 16-KB page size — libgmm-jni.so not supported. How to fix?
Google Play is warning that my app does not support 16-KB page size. My app currently supports only 4-KB pages.
When I checked my AAB using the APK Analyzer, I found that the file libgmm-jni.so does ...
0
votes
0
answers
61
views
sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin
I used sonar-maven-plugin 3.11.0.3922 on a java program which was compiled with jdk1.8.0_391_x64, but got the "sonar failed: An API incompatibility was encountered while executing org.sonarsource....
1
vote
0
answers
37
views
WaveMaker 9.4 to 10.6.6 Migration: Type Mismatch Errors (Integer to BigInteger) in Generated Java Code
Problem Summary
I'm attempting to migrate a WaveMaker project from version 9.4 to 10.6.6 and encountering persistent compilation errors related to type mismatches between Integer and BigInteger in the ...
0
votes
0
answers
41
views
setOpenInBrowserButtonState(CustomTabsIntent.OPEN_IN_BROWSER_STATE_OFF) for CustomTabsIntent Not Working
I am trying to open a webpage in a CustomTabsIntent and hide the "Open in Chrome" option which appears to be done in androidx.browser v1.9 or later.
This is the code
CustomTabsIntent.Builder ...
2
votes
1
answer
81
views
ConcurrentMap: atomically check if a value if present, and then mutate it with a consumer
Given a Java ConcurrentMap, I would like to atomically:
Check if an entry is contained in the map
If it is present, run an action (I'm thinkng of a BiConsumer taking the key and its value)
Otherwise, ...
1
vote
0
answers
56
views
Spring Framework 5.3.39: javax.jms.IllegalStateException when sending a message with jmstemplate under IBM Websphere 9
I'm having a problem migrating from Spring 4.3.5 to 5.3.39 (I know community support for these versions has ended, but I need to investigate the problem).
My application runs on IBM WebSphere 9 (JVM 8,...