Category "java"

JPA duplicate entry error on EntityManager.remove and then EntityManager.persist

I am using Hibernate implementation of JPA. Let's say I have a list of objects which I have to persist in a table called Event. All these objects have the same

using 100+ EditTexts in Android Studio causes to lag the application

I want to use 100+ edittexts in android studio but when I add 100+ edittexts, on application start, it lags for a while, once it renders then it is ok but the l

How to change library version in jar included in some project

I have project where I have included custom built jars. Now suppose there is log4j dependency with lower version in that included jar. Can I change log4j versio

Add a loading effect with progress

Often when we download something use the terminal or the command prompt, we get a progress like this: ----------10% after a while ----------------------------

Best Practice to transform request headers before passing it to rest contoller

I am working on a Spring Boot project with Java 11. I have a rest controller that has a GET endpoint. The controller method takes account number as one of its a

i have this exception "org.hibernate.tool.schema.spi.CommandAcceptanceException:

this is my code package com.examplesector.choosesectors.models.Entity; import lombok.*; import javax.persistence.*; import javax.validation.constraints.Size;

How get two joined tables from database in Spring Jpa?

I have two tables, joined each other. How I can get from database both of them using Spring data jpa? Code as below, @Entity @JsonNaming(PropertyNamingStrategie

Why object is not null in below java code? [duplicate]

In below code the answer is "kjl". here the object is assigned to null. Why object is not null here? public class Main { public static voi

How to perform Data Type validations for each individual fields of a POJO in Java?

I have a Request POJO class which comes with all String data type fields. When I have to store them to DB, the data types must be accurate. Considering that I

How to Connect to multiple Queue Managers and exchange data between them

I am Trying to connect to multiple QueueManagers in IBM MQ Explorer using java. I am able to connect to single Queue Manager and send nd receive data from it bu

How to convert graphics overlay into bitmap in mlkit android

I want to just convert graphics overlay to bitmap . https://github.com/googlesamples/mlkit/blob/master/android/vision-quickstart/app/src/main/java/com/google/ml

Not able to establish connection between mongodb and Springboot through app.properties file

I want to establish connection with mongodb through app.properties files in Spring boot. Currently, I am establishing connection through Uri variable declared i

imagemagick Convert working in Command line but not in java process runtime

I have a tif image where I am trying to draw a box and compress the image with LZW compression simultaneously. this is the command I am running, and it works fi

proto3: Why setting java_multiple_files = true not creating separate java classes for each proto message?

I have a proto definition with nested classes syntax = "proto3"; option java_package = "com.spot.proto.v1.config"; package v1config; // ClusterConfig proto i

Springboot Actuator Refresh does not reload @Value properties in @ConfigurationProperties

I have a springboot application that ingests an application.properties via @ConfigurationProperties and @PropertySource("classpath:application.properties"). My

Use ScheduledExecutorService to update JavaFX elements

Currently I am making a program that reminds me when to water my plants, while also putting the weather into account. I would like to display the current temper

Should the young generation size be more than a service's normal heap consumption?

We have a service, whose process sitting idle, takes a heap memory of 612 MB. The heap of our service is given a initial and maximum size of 1GB. The young gene

Connecting to Daml JSON API

I am stuck with this error. I don't know how to set the authorization header with a token. Java code: package URL; import org.json.simple.JSONObject; import su

IntegrationFlow memory leak

I have two integration flows that get files from two different directories. @Bean public IntegrationFlow processBridgeFlow() { return Integratio

How can I delete the product and corresponding logs?

I want to delete all the product logs of a specific product depending on its product_id(FK). I created product logs to monitor when the product it's created and