Category "java"

Groovy script to get translations using Google Translate API gives java.lang.NoSuchMethodError

I am trying to write a Groovy script to get translations from Google Translate API (using an API key, stored in as the GOOGLE_API_KEY environment variable1) but

Hibernate : functionnally calling hibernate to recreate constraints

I have been deferring my hibernate DDL usage time after time, from create-drop, to update and now i'm using other tools for database migration, and, while still

Why am I Getting Null Pointer Exceptions in My Linked Lists?

Could someone check my code for why I'm getting NullPointerExceptions in various methods? I've been racking my brain and can't figure out what is wrong. I'm att

Postman Post Request column cannot be found error(JDBC/MYSQL/AWS)

I am working on an independent JDBC/Springboot project and I am having a lot of trouble actually posting any data from postman into MySQL. I have tried looking

how to auto-refresh AWS STS Temporary security credentials when it expires while accessing Amazon SQS?

I've spring boot app with QueueMessagingTemplate as client to access Amazon SQS using temporary security credentials(STS). Getting temp token using STS-AssumeRo

Stream file from S3 without downloading locally

Is it possible stream a zip file through a Java (spring boot) service from Amazon S3 without having to actually download the whole file in the service? For cont

How to initialize an entity which is represented by a Vaadin Grid's row?

I use Vaadin framework v23 for my project. A wanted to add a component column to one of my Grids, a number field. My Grid's rows are representing an entity from

Text not appearing in a linear layout?

I have created a game which has the function to build castles, the castles are put in a list that you access with a button and are shown with a linear layout. T

Query method parameters should either be a type that can be converted into a database column or a List

package com.example.hand.data; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import an

Request Body Missing in Spring while updating using PATCH API in react js

Spring shows - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.cg.bookstore.entities.

How to test a repository with a user that have update rights and the test needs tot add records to the database

I use mysql and spring 5, spring-data-jpa and spring-boot and JUnit5. This must be a common problem but I don't see te sollution. I have to test a repository wi

SpringBoot Sleuth/Zipkin Tracing: Issue adding a client, for Zipkin Server

Small question regarding a Java 11 + SpringBoot 2.6.7 web application, in the context of Zipkin please. I have a very simple micro services architecture SpringB

Set Java/JRE default settings which can be overridden by JAVA_TOOL_OPTIONS

I have multiple java spring boot services, which are running in docker containers and are configured via docker-compose. Each of those services need several jav

How to apply test-driven development for storing data on db?

Let us assume that the next feature that I have to develop is to store some data on a database. Following the TDD paradigm, I have to first write a failing test

Java Time & Rest API

I’ve red multiple articles and discussions and still I have some uncertainty: I’m not sure if I should use Instant or any other type to store Bookin

My Junit5 Test class not running, package XXX does not exist error

I have a maven project setup as normal: src/main/java/a/b/c/MyApp src/test/java/a/b/c/MyAppTest I am having a weird problem in IntelliJ, where my junit5 test cl

SpringBoot Sleuth/Zipkin Tracing: Issue adding a client, for Zipkin Server

Small question regarding a Java 11 + SpringBoot 2.6.7 web application, in the context of Zipkin please. I have a very simple micro services architecture SpringB

NullPointerException when MockMvc performed in unit test

I'm trying to write a Java unit test but not sure where I'm going wrong. Likely a lack of understanding. This is my test so far: @Test public void getURL() thro

How to read XFA form field and data in Java and how to convert XFA form PDF to normal PDF

I need to read XFA PDF form filled data in Java. And also we need to convert the XFA form PDF to normal PDF.

Time Format String

I am trying to decode the date-time receiving from my APIs in my required format "yyyy-MM-dd" I receive time in 2 format 1. "2022-05-05T11:32:12.542Z" 2. "2022-