Skip to main content

All Questions

Tagged with
-1 votes
0 answers
53 views

JComboBox throws IllegalComponentStateException when selecting an item

I’m a Java beginner currently experimenting with Swing to get used to building GUIs. There’s no actual logic yet — I’m just focusing on layout and component structure. When I click on a unit in either ...
jamesdiaz's user avatar
1 vote
1 answer
91 views

Spring Boot Swagger throws "Failed to load API definition. Response status is 500 /v3/api-docs" after adding Exception Handlers

this is my first time asking a question here, so please bear with me if I miss anything. I’ve created a simple Spring Boot banking project with the following REST APIs: /create /getAccount /deposit /...
Vijay Mohan Rangaraju's user avatar
1 vote
0 answers
64 views

How do I implement an automatic error logger that handles both uncaught and caught (caught in try catch block) exceptions?

I was wondering if it is possible to implement an automatic error logger with specific functionality that logs errors into a PostGres Table. Basically, in my application i have both handled and ...
Sushi Gucci's user avatar
0 votes
0 answers
47 views

Java Sping in container can't connect to external oracle database

I have a java spring boot inside docker a container which has to connect to an external Oracle database, i have set the db properties in the application.yml file. The connection shouldn't require TLS/...
CCC's user avatar
  • 200
0 votes
2 answers
68 views

Valid parenthesis problem passes tests but fails when I submit

I'm currently trying to solve the Valid Parenthesis problem on Leetcode, in Java, that goes as follows: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if ...
pxkaa's user avatar
  • 1
0 votes
1 answer
49 views

ClassNotFoundExcetion is thrown by library when class is present in the application's classpath

I have a Maven project with the following dependencies: org.apache.poi:poi-ooxml:4.1.0 org.apache.poi:poi:4.1.0 An internal dependency/library, lets call it Lib-A, which was built using Gradle. This ...
user6952691's user avatar
1 vote
2 answers
57 views

How to avoid memory allocation in catch block in Java Spring application (string interpolation)?

I am writing a Java Spring Boot (servlet) web-API application. There are repository classes in the application. Repository methods are written "from scratch" using Google Cloud Datastore API ...
nickolay's user avatar
  • 3,905
-1 votes
1 answer
41 views

NoSuchElementException and premature closure of scanner

I have made a program that reads 5 integers and outputs its polarity(positive or negative), its type(odd or even). Used Scanner.nextLine() to read the input as string and split it with .split("\s+...
Entropy's user avatar
0 votes
1 answer
70 views

Java exception e.getMessage() is null

I have a small question regarding Java Exception.getMessage(). My code is using a client, a third party library I have no control over. try { thirdpartyclient.doSomthing(); return ...; } catch ...
PatPanda's user avatar
  • 5,198
0 votes
0 answers
30 views

Exception is thrown when I try to close the Modbus slave

I am using the j2mod Modbus library 3.1.1 with Java 8. In my JavaFX application, I created a wrapper class to handle the interaction with the Modbus slave instance. The wrapper class implements the ...
onurozcelik's user avatar
  • 1,214
1 vote
0 answers
220 views

Class not found exception org.springframework.data.web.config.SpringDataWebSettings

I pulled this Spring JPA dependency <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version>2.4.0</...
coosta's user avatar
  • 46
0 votes
1 answer
158 views

Issue with Quarkus exception handling extension not capturing exceptions

I’m working on several Quarkus APIs that communicate via REST within a Kubernetes cluster. I’ve implemented an exception handling mechanism that captures exceptions, formats them to match a standard, ...
Laurent_LDNR's user avatar
0 votes
1 answer
67 views

Java Antlr4 ParseCancellationException Ignored (Solved-ish)

Solution: This is a workaround, but if you store a boolean 'cancel' field within your listener class, and, at the top of any exit methods, check this value and throw an exception if True, this ...
Willo678's user avatar
0 votes
1 answer
120 views

I am Getting " java.lang.ClassNotFoundException: ava.lang.WrongThreadException" Exception in Springboot , However the App works as usual?

Code is working Correctly without any errors LOGS default However , if I enable #logging.level.root=DEBUG I can see 3 Exceptions in logs java.lang.ClassNotFoundException: java.lang.foreign....
Ashdeadshot's user avatar
3 votes
3 answers
158 views

Java custom exception handling. Which class to extend?

I am taking a Java course. So I am just learning Java. The textbook says to either extend the Exception class or extend the RuntimeException class for a custom exception. I understand RuntimeException ...
XCELLGUY's user avatar
  • 329

15 30 50 per page
1
2 3 4 5
1040