Resolving “Failed to Configure a DataSource” Error 1. Overview In this short tutorial, we’ll discuss what causes and what resolves the “Failed to configure a DataSource” error on a Spring Boot project. We’ll resolve the issue using two different approaches: Defining the data source Disabling the auto-configuration of the data… Continue Reading spring-boot-failed-to-configure-data-source

A Guide to SimpleDateFormat 1. Introduction In this tutorial, we’ll be taking an in-depth tour of the SimpleDateFormat class. We’ll take a look at simple instantiation and formatting styles as well as useful methods the class exposes for handling locales and time zones. Now, before getting started, let’s keep in mind SimpleDateFormat is not… Continue Reading java-simple-date-format

Fixing the JPA error “java.lang.String cannot be cast to Ljava.lang.String;” 1. Introduction Of course, we’d never suppose that we can cast a String to a String array in Java: java.lang.String cannot be cast to [Ljava.lang.String; But, this turns out to be a common JPA error. In this quick tutorial, we’ll show how this comes… Continue Reading jpa-error-java-lang-string-cannot-be-cast