Category "java"

Cannot get footer table to be entire width of PDF in iText Java

I am using iText PDF version 5 in Java. I have a table at the bottom of my page that I need to be the entire width of the page up to the margins of the page. He

I am not able to launch main activity while provisioning device

This is my AdminReceiver public class MyDeviceAdminReceiver extends DeviceAdminReceiver { private final String TAG = MyDeviceAdminReceiver.class.getName();

Why @JsonInclude(JsonInclude.Include.NON_EMPTY) is not working?

I am trying to set null values to database of empty values from JSON payload. This problem caused beacause I have unique constraints on social entity fields. I

transform map : add new key value pairs to existing map Java 8

I'm trying to transform a Map by adding a new JsonObject key-value pair, if any of the map's JsonObject's key contains the "-fragment" String. Set<Map.Entry&

How to flow Data from One RecyclerView to Another RecyclerView when an item in first RecyclerView is clicked?

Hi, I faced an issue here.. I was creating a chatbot in which user can type a text to send it and also can select a text out of the recommended texts so I crea

Android: Start an Activity from a Service when app is killed

In my app, I have a Service running in the background (and foreground). In this Service, there's a CountdownTimer and when it finishes I want to launch the app

Logging In the Aeron

I'm looking for a solution to log all requests/errors in a log file to parse logs with ELK Is there any best practice or sample? or what's the Aeron recommendat

PreparedStatement getMaxRows always returns 0

So i have a problem where i want to see how many rows there are in my database, after i've made an update. Im trying to use "GetMaxRows" but it always returns 0

How to provide completely custom JSON for example in Swagger?

I have Java endpoint which receives json-deserializable object. Unfortunately, Swagger is unable to auto-generate good example for it. Is it possible to provide

Hibernate envers revision throws exception when use @OrderBy

I have 2 entities and use Hibernate envers and Spring envers for auditing @Data @ToString(exclude = {"groupReportPrices"}) @EqualsAndHashCode(exclude = {"groupR

Decode ByteArrayOutputStream without string it

I want a byteArray from a baos (ByteArrayOutputStream) but the baos contains some special characters (like '&' ) so I use StringEscapeUtils.unescapeHtml to

Migrating to 'Morphia' from Hibernate OGM

I have been running MongoDB (5.0.7) for a number of years with Hibernate ORM & OGM. Currently using 'org.mongodb:mongodb-driver-core:4.6.0'. (2022.04.26) Us

Download all the files from Azure blob storage , zip it and upload the zip file in JAVA

I want to download all the files from Azure blob storage, create a zip file out of these files and upload the zip file back to the blob storage. As the file siz

ClientAuthenticationException using MS Graph API and Java

I have an issue with sending mails using MS Graph API. Here`s my code: public GraphMailUtil(){ getConfiguration(); this.graphClient = configureG

changes in java code do not appear, program runs from a shell script

I cloned a GitHub repository (https://github.com/tomergreenwald/tac-adx) and did some changes in the code. But if i run the application with the runServer scrip

Character Class Method issues

So I'm currently working on a school assignment which is to design a program that allows the user to enter some text, and then the program checks: The first let

Error creating bean with name 'entityManagerFactory - nested exception is java.lang.NullPointerException

I'm only learning Java and Spring and after several projects/tutorials went well I'm stuck with this error on a new project: org.springframework.beans.factory.

JavaFX app overwriting files while being open causes exception

I have a runnable jar file (with a lib folder housing all the dependency jars). This is located on a network share which anyone that has access can run from. Th

Issues my method to get a 2D circle to move in a circle

OBS! Changed as part of the question has been answered. My math has been fixed due to your help and input, the same with StackOverflowError but I still can get

Problem invoking EJB from with a client that use Java 1.8.0_331

Switching from Java 1.8.161 to 1.8.0_331 the EJB client stopped working. The error message is: Apr 25, 2022 8:34:49 AM org.xnio.ChannelListeners invokeChannelLi