Protobuf vs. gRPC
1. Overview In software development, microservices architecture has become a favorable approach for creating scalable and maintainable systems. Effective communication among microservices is crucial,...
View ArticleInsert JSON Object into PostgreSQL using Java preparedStatement
1. Introduction In modern software development, handling JSON data has become ubiquitous due to its lightweight and versatile nature. PostgreSQL, with its robust support for JSON, provides an excellent...
View ArticleMessage Conversion in Spring Cloud AWS v3
1. Overview Message conversion is the process of transforming messages between different formats and representations as they’re transmitted and received by applications. AWS SQS allows text payloads,...
View ArticleCreate a RAG (Retrieval Augmented Generation) Application with Redis and...
1. Overview In this tutorial, we’ll build a ChatBot using the Spring AI framework and RAG (Retrieval Augmented Generation) technique. With the help of Spring AI, we’ll integrate with the Redis Vector...
View ArticleResolving PostgreSQL JSON Type Mismatch Errors in JPA
1. Introduction In this tutorial, we’ll explore the common PSQLException error: “column is of type json but the expression is of type character varying” when using JPA to interact with PostgreSQL....
View ArticleGuide to getResourceAsStream() and FileInputStream in Java
1. Overview In this tutorial, we’ll explore the differences between different methods of reading files in Java. We’ll compare the getResourceAsStream() method and the FileInputStream class and discuss...
View ArticleCheck Whether a Collection Contains an Element or Not Using Hamcrest
1. Overview When we write unit tests in Java, especially with the JUnit framework, it’s common to verify that a Collection contains a specific element. As a powerful library, Hamcrest offers a simple...
View ArticleFinding Max and Min Date in List Using Streams
1. Overview In this article, we’ll explore how to find the maximal and minimal date in a list of those objects using Streams. 2. Example Setup Java’s original Date API is still widely used, so we’ll...
View ArticleHow to Fix Hibernate UnknownEntityException: Could not resolve root entity
1. Overview In this short tutorial, we’ll elucidate how to solve the Hibernate UnknownEntityException: “Could not resolve root entity”. First, we’ll explain the root cause leading to the exception....
View ArticleJava Weekly, Issue 549
1. Spring and Java >> Why Update Data-Oriented Programming to Version 1.1? [inside.java] An insightful journey into the world of data-oriented programming. A solid read. >> Dynamic...
View ArticleList All Files on the Remote Server in Java
1. Overview Interacting with a remote server is a common task in modern software development and system administration. Programmatic interaction with a remote server using an SSH client allows for...
View ArticleGetting the Insert ID in JDBC
1. Introduction When working with JDBC to insert data into a database, retrieving the auto-generated primary key is a common requirement. JDBC provides a mechanism to fetch the insert ID immediately...
View ArticleNaming Executor Service Threads and Thread Pool in Java
1. Overview ExecutorService provides a convenient way to manage threads and execute concurrent tasks in Java. When working with ExecutorService, assigning meaningful names to threads and thread pools...
View ArticleConsumer Acknowledgments and Publisher Confirms with RabbitMQ
1. Overview In this tutorial, we’ll learn how to ensure message publication to a RabbitMQ broker with publisher confirmations. Then, we’ll see how to tell the broker we successfully consumed a message...
View ArticleIncompatibleClassChangeError in Java
1. Overview In this article, we’ll explore the IncompatibleClassChangeError in Java, a runtime error that occurs when the JVM detects a class change that is incompatible with the previously loaded...
View ArticleCounting an Occurrence in an Array
1. Overview A common programming problem is counting the occurrences or frequencies of distinct elements in a list. It can be helpful, for example, when we want to know the highest or lowest occurrence...
View ArticleTesting Quarkus With Citrus
1. Overview Quarkus, the Supersonic Subatomic Java, promises to deliver small artifacts, extremely fast boot time, and lower time-to-first-request. We can understand it as a framework that integrates...
View ArticleBlazing Fast Serialization Using Apache Fury
1. Overview In this article, we’ll learn about Apache Fury, an incubating project under the Apache Software Foundation. This library promises blazing-fast performance, robust capabilities, and...
View ArticleCheck if a List Contains Elements With Certain Properties in Hamcrest
1. Overview When writing unit tests in Java, particularly with the JUnit framework, we often need to verify that elements within a list have specific properties. Hamcrest, a widely used Matcher...
View ArticleHow to Handle Default Values in Avro
1. Introduction In this tutorial, we’ll explore the Apache Avro data serialization/deserialization framework. What’s more, we’ll learn how to approach schema definition with default values used when we...
View Article