Home » Archives for Anmol Deep

Author Archives: Anmol Deep

Anmol Deep
Anmol Deep is a senior engineer currently working with a leading identity security company as a Web Developer. He has 8 years of programming experience in Java and related technologies (including functional programming and lambdas) , Python, SpringBoot, Restful architectures, shell scripts, and databases relational(MySQL, H2) and nosql solutions (OrientDB and MongoDB). He is passionate about researching all aspects of software development including technology, design patterns, automation, best practices, methodologies and tools, and love traveling and photography when not coding.

Amazon Redshift JDBC Connection Example

In this tutorial, we will learn about how to set up a JDBC connection to an Amazon Redshift cluster. We will also discuss and analyze a coding example where we connect to an Amazon Redshift Cluster via JDBC and perform CRUD operations on a table. 1. What is Amazon Redshift? Amazon Redshift is a fully managed data warehouse service in ...

Read More »

Apache Maven Rat Plugin Tutorial

In this tutorial, we will learn about the Apache Rat tool and the Apache Maven Rat Plugin for Java applications. We will also see how to integrate the plugin into the verify phase of the Maven build lifecycle. Lastly, we will configure the plugin to detect and approve our custom license headers. 1. What is Apache Rat? Apache Rat is ...

Read More »

Apache Maven Felix Plugin Tutorial

In this tutorial, we will explore the Apache Maven Felix plugin and see how it can be used to build OSGi bundles. We will talk about OSGi fundamentals followed by developing an example built using the Maven Felix Plugin. Lastly, we will install and run our bundles on the appropriate platform. 1. Introduction Writing the MANIFEST.MF file manually is quite ...

Read More »

Jackson vs Gson: A Deep Dive

This is a tutorial about Jackson vs Gson. Specifically, we will do a quick comparison of the libraries Gson and Jackson for serialization of a Java object to its JSON representation and deserialization of JSON string back to an equivalent Java object. We will talk about the benefits of each and see which library to use when. 1. Maven Dependencies ...

Read More »

Jackson Bidirectional Relationships

In this example, we will go through the Infinite Recursion (StackOverflowError) problem, when working with Bidirectional Relationships in Jackson model classes. We will also see different techniques to serialize and deserialize such entities. If you are new to Jackson, it is good to go through this primer on ObjectMapper before proceeding with this example. 1. What is a Bidirectional Relationship? ...

Read More »

Jackson Exceptions – Problems and Solutions

1. Introduction In this example, we shall go through the most common Jackson API exceptions encountered while working for serialization and deserialization. We will see what caused the exception to be thrown and how to fix it. Let’s dive deep. Table Of Contents 1. Introduction 2. InvalidDefinitionException: No Creators, like default constructor, exist 3. MismatchedInputException: Out of START_ARRAY token 4. ...

Read More »

Jackson Annotation Examples

This example is a deep dive into Jackson Annotations. It covers almost all the annotations with code examples. We will learn how to use the existing annotations, create our custom annotations and finally how to completely disable Jackson annotations. If you are new to the Jackson API for JSON serialization and deserialization, check out this article on Introduction to Jackson ...

Read More »

Introduction to Jackson ObjectMapper

In this example, we will learn about the ObjectMapper class from Jackson and its capabilities to serialize POJOs(Plain Old Java Objects) into JSON strings and deserialize JSON strings back into Java objects, with some examples. 1. Where To Start? The first step to getting our hands dirty with ObjectMapper and Jackson data binding is to get the libraries and add ...

Read More »

Method Handles in Java

In this example, we will discuss in detail about Method Handles in Java, a feature introduced in Java 1.7. We will talk about the Java Reflection API and its performance issues, method handles, why were they introduced, and how to create and use them. 1. The Java Reflection API The old school Java Reflection API (introduced in Java 1.1) is ...

Read More »

Java Naming Conventions

In this example, we will be discussing naming conventions for the Java Programming Language. We will talk about different identifier types and the best practices to follow while naming them in your program. 1. Introduction As a team member of a codebase of any size (small, medium, or large), it is the responsibility of the programmer or the developer to ...

Read More »