Questions tagged [java]

Java is a high-level object-oriented programming language. Use this tag when you're having problems using or understanding the language itself. This tag is frequently used alongside other tags for libraries and/or frameworks used by Java developers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

how can i add an image on the border of the cardview

the design I want to make the image view in the left side of the card view in which 'KM' is written I want to know how can i make the same design in my app in Android Studio using XML and Java I have ...
Ubaidur Rahman Shaikh's user avatar
0 votes
0 answers
4 views

Custom YAML deserializer with Jackson Library

I was wondering how I can implement the custom deserializer for the YAML with Jackson Library. I went to Google and found information that I can simply extend from the StdDeserializer class and then ...
Artem Semenov's user avatar
-1 votes
0 answers
5 views

How to use nimbus OAuth OID SDK in Java to get token from Keycloak configured for private key JWT authentication

I have setup keycloak for private key JWT authentication wherein I have created a client and an identity Provider and in the provider added all the mandatory values. In the client, under Credentials ...
Tech Savy's user avatar
0 votes
0 answers
5 views

ActiveMQ Broker Stopping due to exception, java.io.IOException: Deadlock found when trying to get lock; try restarting transaction

ActiveMQ Broker is Stopping due exception, java.io.IOException: Deadlock found we are using MYSQL as a backend database , please hep me if any settings to be done in both MYSQL or ActiveMQ to avoid ...
Arifulla Khan's user avatar
1 vote
1 answer
19 views

How to create child object from parent one assigning some fields

I am a newbie in Java and would like to gather some ideas, because I stucked. I have some parent class, let's say @Data public class Person implements Hometown { private String name; private ...
Ekaterina Anisova's user avatar
0 votes
0 answers
13 views

How to wait until the scheduled task completes execution

How to wait until the scheduled task completes execution, before starting the next iteration. The following options all fail to work @Scheduled(cron = "*/30 * * * * *") @Scheduled(fixedDelay ...
user352290's user avatar
-3 votes
0 answers
25 views

How will Java 21 make a difference to the developers who are using Java 17? [closed]

How will Java 21 make a difference to the developer and how can we make our code more efficient using Java 21? How would our life be easier after 21 released?
Saurabh Sonawane's user avatar
1 vote
1 answer
33 views

Values are retrieved as null even if the JSON files have values to keys

I have a JSON file which looks like: { "caseNumber": "kblndw896", "features": [ { "id1": "wad12jkb", "id2": "...
Manjunath G Kabade's user avatar
0 votes
0 answers
17 views

Java System.out.print backspace [duplicate]

Okay, I am being driven a little crazy by this issue. I am currently printing out multiple prompts to ask for a list of 10 numbers. I just use the java.util.Scanner as follows: ArrayList<Integer>...
PackDude's user avatar
0 votes
1 answer
12 views

MockitoJUnitRunner throws NullPointerException while instantiating AppCompatActivity

I am trying to mock an Activity which extends AppCompatActivity using the MockitoJUnitRunner. I understands that I should use Instrumentation Test to test the activities in Android. Here I just want ...
Raj's user avatar
  • 496
1 vote
0 answers
6 views

Does a query occur through dirty checking even if the same value is inserted into the corresponding column?

I'm configuring an entity update method, and I'm curious what the result will be if I put the same value in the same column as before and perform dirty checking. public class Member extends BaseEntity ...
HEE-GEON's user avatar
0 votes
0 answers
5 views

com.google.cloud.storage.StorageException: java.lang.RuntimeException: Exception occurred while reading the license file

The error is occurring when a Batch Server logs in to the Google Cloud Storage to search for files in the Google Cloud Storage. The Batch Server logs in using the cloud client credentials that is ...
Allen Windel Bernabe's user avatar
-7 votes
0 answers
26 views

Linked Lists and Stacks [closed]

https://1drv.ms/w/s!Amp2zMx1tZ22lGHrU_xvi6DF7_BO?e=do2c9H Hi, i could not complete this assignment i am facing too many issues multiple errors, and all please help me fix this, this is due today ...
Alex Kapila's user avatar
0 votes
1 answer
13 views

How to create an additional YAML file for Swagger UI instead of a replacing one?

I have 2 Spring profiles. There's one difference between them that I need to have included in my Swagger UI. These profiles use a different server. I have @OpenApiDefinition with a bunch of lines of ...
IceMajor's user avatar
  • 115
-1 votes
0 answers
33 views

What does stream() has already been operated upon or closed mean [duplicate]

There are many examples in which stream() method is called on object. Example : List number = Arrays.asList(2,3,4,5,3); Set square = number.stream().map(x->x*x).collect(Collectors.toSet()); Does ...
Kavita Kulkarni's user avatar
0 votes
0 answers
11 views

Unescape Characters for DBeaver

Previously, when I migrated SQL queries from JAVA to DBeaver, SQL queries were automatically escaped to the correct format. I am currently working on Mac OS and the escaping feature is not working. ...
Mikhail Gorbov's user avatar
-1 votes
0 answers
17 views

Thrown during a 500 internal exception but can access the service

After a while in the Docker environment, my responses change automatically.The environment throws 500 as if it was dumped, but it reaches the service and returns the correct message. Controller @...
Ahmet Harun Çelik's user avatar
0 votes
0 answers
10 views

I am Working on Ble Android Application. while receiving data from esp32 server my app got crash showing Input channel destroyed: 'ClientS', fd=172

here i paste my logs data please help me , i am newbie to Android ble 488 set: Unset optional value from type SMPTE2086 2023-09-29 15:40:39.867 19329-19358 IMGMapper com.eapro.myproject ...
Javed Quantum's user avatar
-1 votes
0 answers
23 views

@EnableCaching(mode = AdviceMode.ASPECTJ) not working with shaded-app.jar

I have a Spring Boot application with a configuration class containing the required annotations for enableCaching with AspectJ @Configuration @EnableTransactionManagement(order = 2, mode = AdviceMode....
R V's user avatar
  • 1
-2 votes
1 answer
12 views

Swagger UI: TypeError: NetworkError when attempting to fetch resource on deployed application

I've just deployed my application (Spring Boot + Vaadin) to a free hosting (alwaysdata.com). Everything seems to be working really good so far, but the Swagger UI. I can't make any call to my API ...
IceMajor's user avatar
  • 115
-1 votes
0 answers
7 views

proguard latest version getting NoSuchMethodError

I'm getting this error for the latest proguard version Java version is 1.8 [INFO] proguard jar: [..m2\repository\net\sf\proguard\proguard-base\6.2.2\proguard-base-6.2.2.jar] [proguard] ProGuard, ...
Ara's user avatar
  • 61
0 votes
1 answer
14 views

Gatling: How to share dynamic authentication between virtual users?

Using Gatling (in Java), I would like to run a performance test against a backend needing some authentication via bearer token (JWT). The token expires after 5 minutes, so I'll need to renew it, if ...
ahuemmer's user avatar
  • 1,684
0 votes
2 answers
38 views

Extract Consumer variable fields while mocking Lambda expression

I have a method for batch updating a table. Problem is when i try to call below block of code it is giving class cast exception, when(session.doWork(any())).thenAnswer(invocation -> { ...
bon mohanty's user avatar
0 votes
0 answers
7 views

Tomcat 10.1.13 in Intellij

Intellij configuration server Default uri with 404 error Uri with the /jsp-hello-world name of the project ViewServlet.java and pom.xml web.xml and all the .jsp files I do not get any errors in the ...
Josan Cristi's user avatar
1 vote
0 answers
24 views

Java 17 debugger not stopping to breakpoints

I created a project using Java 17 and i'm trying to enter debug trough the running command spring-boot:run -Dspring-boot.run.fork=false, but debugger won't stop at the breakpoints. It only starts when ...
Stefano Suunto Di Blasio's user avatar
0 votes
0 answers
25 views

After migration Spring Boot to 3.1.x ConditionalOnBean doesn't work

I have custom configuration for module meaning @AutoConfigureAfter(DataSourceAutoConfiguration.class) then I create @Bean @ConditionalOnBean(DataSource.class). In Spring Boot 2.7.x it works, after ...
Chris Pozniak's user avatar
-1 votes
0 answers
11 views

why my app in android studio with this code is closing after pushing button?

i wrote an app in android studio (electric eel version) about mathematical fit when i push button suddenly out of blues app closes! i send you the code please tell me where is the problem? thanks in ...
tera lova's user avatar
0 votes
2 answers
23 views

Changing the color of a word in a TextField in javafx

I have a TextField(JavaFX) whose text color is black, but if the word warning was in the text, it would come and only change the color of the word warning to red.
BaRiboD's user avatar
  • 13
0 votes
0 answers
4 views

Error "Module not found error' on custom module

I've created a custom module which I want to use in another JavaFX application. When compiling the JavaFX application, I got an error "Module not found: com.mycompany.mymodule" in my JavaFX ...
user10053673's user avatar
0 votes
0 answers
18 views

Java is not recognized in MacOs Ventura 13.5

I got a MacBook Air M2 to develop Flutter applications. When I opened a project for the very first time, it asks me to install gradle extensions, but now when I open a project, Visual Studio Code ...
Manuel's user avatar
  • 103
0 votes
0 answers
11 views

Netbeans 18 Context menu button 'Run file' is grayed out

In Netbeans 18 the context menu 'Run file' is grayed-out on a new JFrame, when i open the context menu from somewhere in the code. (Same with the debug file.) The funny thing is that the context menu ...
Mike Smit's user avatar
0 votes
0 answers
8 views

How to make a JavExec task incremental in gradle?

I have a JavaExec task in my build.gradle file and it doesn't follow incremental build. Is there a way to make JavaExec tasks incremental, just like how JavaCompile tasks are made incremental? Let me ...
bsa's user avatar
  • 13
0 votes
1 answer
10 views

Wrong return for Sum of nodes on the longest path from root to leaf node

I am trying to solve GeeksforGeeks problem Sum of nodes on the longest path from root to leaf node: Given a binary tree of size N. Your task is to complete the function sumOfLongRootToLeafPath(), ...
Mr. Doggo's user avatar
0 votes
1 answer
30 views

Add Edit Listner to FilePane in Swing

How to listen to the edit Action of name in FilePane. Line 1394 in FilePane.java class EditActionListener implements ActionListener { public void actionPerformed(ActionEvent e) { ...
swinger's user avatar
1 vote
1 answer
22 views

Quick Sort code issue giving array out of bound exception

public class Solution { public static int partition(int []arr,int lb,int ub) { int start=lb; int end=ub; int pivot=arr[lb]; while(start<end) { while(arr[start]<=pivot)...
Aayush Pachpande's user avatar
-1 votes
0 answers
11 views

Transition from CRC to CPRC: Navigating Document Information Requests

I was aware of the existence of the CRC service; however, it seems to have been replaced by CPRC. What is the reason for this, and which endpoint should I use when I want to request information about ...
Rita Raposo's user avatar
0 votes
0 answers
21 views

Error "Expected Receiver of Type" using Java Reflection in Android

I encounter this error while trying to learn how to use Java reflection Expected receiver of type android.content.pm.PackageManager, but got java.lang.Class<android.content.pm.PackageManager> ...
localacct's user avatar
  • 611
0 votes
0 answers
9 views

Prevent Spam by Modify Events Java.NIO.WatchService

I am currently working on an application which deals with the Java.NIO-API, in particular the WatchService. My problem now is that the application is being deployed on debian 9 systems which still ...
paul's user avatar
  • 11
0 votes
0 answers
12 views

Unable to set timeout for cucumber steps in java

currently we have our test-steps implemented via io.cucumber.java.en.Then; @Then("do something") after some resarch i found, that you should be able to add a step-timeout like this: @Then(...
Tobi's user avatar
  • 3
-4 votes
0 answers
27 views

Create a javascript for bodybuilders that can generate unique meals [closed]

Challenge Create a javascript for bodybuilders that can generate unique meals per day. Meals can consist of below food items: Food Item A - 239 calories Food Item B - 130 calories Food Item C - 155 ...
lasantha's user avatar
0 votes
0 answers
9 views

Keycloak after login gets in loop

I am securing my java application using Keycloak saml for that I am using SamlFilter but after successful login it is just continuous redirecting it again and again in loop. My keycloak-saml.xml file: ...
user3458271's user avatar
0 votes
0 answers
25 views

Create Trigger by SQL in Liquibase: Error in SQL syntax

I want to create trigger for 'update_time' and 'deleted_time' to check the update procedure was Update or Soft remove then assign new value to the specific entity Here is the changeSet: <changeSet ...
VieT's user avatar
  • 1
-3 votes
0 answers
23 views

Java Application launch failed. in Mac [closed]

I wanted to run a .jar file on a mac, but I keep getting the following error and none of the solutions on the internet have worked for me. Does anyone have a solution for this? error message: Java ...
Amir Zarbakhsh's user avatar
0 votes
0 answers
9 views

How to passing variable from keycloak backend to account theme

I use keycloak 22.0.1 For account theme I use my own theme it was created according "Keycloak Man" example also I put index.ftl in a my theme root this file from keycloak.v2 And in index.ftl ...
Oleksii's user avatar
  • 11
0 votes
0 answers
8 views

Custom Gradle Properties not recognized

Unity in my device it not detected the custom Gradle Properties file, so it use the default JDK path of Unity. How to fix it? It still work in yesterday. And path of JDK 11 can't paste in Preferences -...
Long Cao's user avatar
0 votes
1 answer
33 views

Changing boolean value from another servlet to stop the loop

I have a for loop which runs based on value of boolean variable. public class LoopClass{ .. private boolean[] toInterrupt = new boolean[]; public boolean getValue() { return ...
Stephan's user avatar
  • 91
0 votes
0 answers
18 views

Cannot get Android project to launch automatically

There are lots of posts on this, but I have not been able to get my app to auto-start on boot. Set up. I have an Android Galaxy Tab S6 Lite. I performed a factory reset. In Android Studio, I created a ...
garrettb's user avatar
  • 149
0 votes
0 answers
7 views

Android-java audioRecord Unable to write wav

Audio Recording is upp and actively recording audio signals, then succesfully save it to audio file to external storage of the device, however, when looking for the saved audio file, i cou'd not find ...
KURT BERNSTEIN BLANCIA's user avatar
-1 votes
1 answer
20 views

The POM for fr.dawan:calculatrice:jar:0.0.1-SNAPSHOT is missing, no dependency information available

I am using Jenkins, Maven, and GitHub. In Jenkins, I fetch the project from the remote repository (GitHub) and execute it (trigger Maven builds). When I do this, it displays the following error: : [...
woodson's user avatar
  • 29
-2 votes
0 answers
20 views

Append marker and error message for existing log(Slf4j)

I am working on a multitenant project with a common code for each tenant. I wanted to filter logs based on each tenant by adding tenant names to them. Existing: log.error("Exception {}" , e....
Sachi97's user avatar
  • 35

1
2 3 4 5
38155