Category "java"

The intellij idea takes up a lot of Ram [closed]

The intellij idea takes up a lot of RAM, is there a way we can reduce the program size?

Do I have to use @Payload spring annotation to read Kafka message

Spring for Apache Kafka 2.8.4 under https://docs.spring.io/spring-kafka/reference/html shows some of the listener methods with @Payload annotation next to the m

SpringBoot: Enabling WRAP_ROOT_VALUE feature using custom Jackson2ObjectMapperBuilder shuts off Swagger3

I've read many articles/threads and what not about how to enable Jackson's WRAP_ROOT_VALUE feature in SpringBoot (v2.2.2RELEASE) and none of them really work, u

In a Java interface, is there a way to return an enum nested in a generic type?

I'm looking for a way to return an Enum type nested in a Generic class. Here's what I mean: public interface MapperClass<E, D> { D entityToDto(E enti

How to run a Java download command using shell in ansible

I want to download and install Java in one our VMs using Ansible. I tried with yum and that was successful but, as part of requirement I was asked to do it anot

Why the data resets after save in database?

I'm trying to save new phone number in database First by another method get phone number and temporary save it and send a code to user then by following methods

Execution failed for task ':app:checkDebugDuplicateClasses '

Task failed with an exception. What went wrong: Execution failed for task ':app:mergeDebugNativeLibs'. Could not resolve all files for configuration ':app:debu

Fixing of Java.lang.IllegalStateException: No active conversation found. at com.rapidclipse.framework.server.jpa.Jpa.getEntityManager(Jpa.java:200)

I have a running RapidClipse X Project, in which I work with a MySQL Database. I created a class to copy data from one table into a second table. For this I use

How do you check if the Second Dimension of a 2D array is null?

Lets say for example you have a 2D Array field[60][]. How exactly can you check if the second part of the Array is null? Is there any way to do something simili

How to load video in OpenCV (Java)

I'm trying to load a video file in OpenCV Java, and have narrowed down my issue to the following code: import org.opencv.core.Core; import org.opencv.videoio.Vi

Getting conversion issue after migrating jackson-databind from 2.11.4 to 2.12.13.2

We have recently migrated jackson-databind from 3.11.4 to 3.12.13.2 version and springframework from 5.2.19.RELEASE to 5.2.22.RELEASE. after the migration we s

Getting 401 Unauthorized Even when the user is authenticated (Spring Security)

I am working on a simple project with 2 defined roles Admin and User,The admin role has authority to view users by thier usernames but when I login as an admin

When running Swing application with the Spring Framework, Unit tests do not work

I am developing a project through the spring framework. I am using JUnit to run unit tests, swing for the GUI. When I run the system, the GUI opens and I can ac

Why does getInterpreter().adaptivePredict in generated parser return incorrect value?

I am creating custom language (EO language) plugin for IntelliJ. I use antlr4 adapter and I've already generated parser and lexer. I am working on syntax highli

How to modify values inside JSON object in Java

I have a JSON Object which looks like this. { "result":{ "issue_date":"20-02-2011", "father/husband":"Chopra", "name":"Variyar", "i

How to solve: The minCompileSdk (31) specified in a dependency's AAR metadata

One or more issues found when checking AAR metadata values: The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/a

How to add customer header to Request?

I'm caught in a situation where I need to manually add a header(Authorization) to the request. The catch is that I only need to add that header to requests comi

How to update the password in Spring SecurityContext?

Using Spring Boot 2.6.4. Here is my SecurityConfig class: @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired Secur

Questions regarding CRUD operations

I am new to Android Studio and I am training to do a CRUD. When I try to insert a plant in the database, the message "Plant inserted" does not appear. Do you ha

Unrecognized VM option 'UseConcMarkSweepGC' when running sample project

I have followed the instructions for getting started with codenameone in IntelliJ, yet when I set up my first project, based on the sample app I get this error: