Category "java"

Using environment variables in gradle.properties file

I'm trying to set "org.gradle.java.home" property in gradle.properties file to run my Gradle project on Java 8 while the rest of my system uses Java 7. Hence, J

How to open new URL in the same tab with Selenium, but with some way with editing the URL?

I want to open a new URL in the same tab in Selenium, but I need to somehow edit the URL. What working options are there? I am thinking about navigating by keys

CellType cannot be resolved to a variable setCellType error Apache POI - Java

I was reading the Apache poi guide: https://poi.apache.org/spreadsheet/quick-guide.html And I decided to follow along and type the code into my Eclipse project

How to combine multiple mp4 videos into one video using jcodec in Java?

I have multiple mp4 files which are parts of a whole mp4 file. They have been just split up to smaller files. I want to combine those files programmatically int

How to write a KafkaAvro Serde for GenericData.Record

I'm using Kafka 0.10.2 and Avro for the serialization of my messages, both for the key and for the value data. Now I would like to use Kafka Streams but I'm stu

Method to box primitive type

Here is a table of primitive types and their equivalent wrapper class. Primitive type Wrapper class ============== ============= boolean Boolean byt

What is wrong with my native query in jpa?

I'm sending a very simple query to the database, but I'm getting an error. It feels like I'm missing something very simple. I guess it wouldn't allow me to crea

"message":"Head \"https://registry-1.docker.io/v2/testcontainers/ryuk/manifests/0.3.0\": unauthorized: incorrect username or password" when run test

I have added testcontainer in spring boot app import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest @Testcont

Spring-mvc + Spring-Security + Thymeleaf - Error Resolving Template

I'm following a simple online tutorial for building a Spring + Spring Security + Thymeleaf + Maven project and I'm getting the following error: [ERROR] [tomcat

swagger-ui No mapping found for HTTP request

I'm trying to document and existing Rest API a Spring MVC project (NOT spring boot!). My application is called api so http://localhost:9090/api would be the r

Compile a JDK 8 project + a JDK 9 "module-info.java" in Gradle

I'm working on a Java library targeting JDK 8, and I'm building it in Gradle 5 using OpenJDK 11. In order to target JDK 8, I'm javac's --release option. Howeve

org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0

i'm this following error when i submit for copying data here is the code.. public String deleteExistingRecordWeekWise(String monthOrWeek) throws ApplicationExc

Merge query in H2 database giving "Unknown data type:" error

when merge native query is used using JPA, it is resulting into following error: {"ts":"2022-05-05T17:03:12.124+0000","level":"ERROR","message":"SQL Error: 500

Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] for XAMPP and Eclipse IDE

I am using XAMPP server and Eclipse IDE for running a hibernate program. But I am getting the following error: **Apr 21, 2017 12:46:38 PM org.hibernate.Vers

LocalDate: equals vs isEqual

LocalDate in Java has two similar methods equals and isEqual. What's the difference between them? When do they output different results?

Checking .wav files for similarity

I'm trying to compare .wav files for similarity. I used the google musicg library for that but I get bad scores for similar sounds. I compare two car motor soun

How to store H2 database file into project directory

When I used H2 database the database files are stored at C:\Users\MyName\TestDataBase.db directory. The H2 path is jdbc:h2:~/TestDataBase. This is default H2 da

Why is a parallel stream slower than a sequential stream?

I have two functions solving the same problem. The first uses a sequential stream, and the second uses a parallel stream. public static int digitalRoot(int n)

Force client or server to restart SSL handshake (or expire SSL session)

I have a java client which connects to an HTTPS server (the server written in Java also). Here is the HttpClient setting in the client: SSLContext ctx = SSLCon

Calling grpc server from multi-threaded client

I have a client side code, which is multi-threaded, calling updateInfo rpc method to the grpc server to update the information(Eventually will updata data in SQ