Configuring and mapping database tables to JPA entities

In this post, we will explore how to map a database tables to JPA Entities. In our example, we will use a Spring Boot environment, JPA 2.2 and Hibernate 5.3.7 . However, the information presented here should apply to any environment with a JPA version of 2.1 or later. Introduction In our previous post, we discovered […]

org.hibernate.MappingException: Could not determine type for: java.util.List – Causes & Fixes

In this post, we will explore a very common Hibernate error, namely a MappingException caused by missing annotations on the Entity getters and fields. The error Let us check the following stack trace as an example:

: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested […]

Spring Boot & Freemarker Configuration Example

Freemarker is a powerful Java template engine. It can be used to generate basically anything, from HTML pages, configuration files, e-mails, or anything else. All you need to do is define your template, use Java to prepare the data, and use the Freemarker engine to process your data with the given template to produce the […]

Java NullPointerException – examples, causes and fixes

Probably one of the most common and annoying exceptions to be encountered by any Java developer is the dreaded “NullPointerException”. A null pointer exception is thrown when an “illegal” referencing of a null object is performed. A “null” object is an object which is not initialized. Let us explore some examples of how a null […]

Scroll to top