My problem was the Hibernate version I used; as I'm running Hibernate 5, several classes and dependencies are no longer supported such as org.jadira.usertype
, joda-time
, Query
as a class, or SetString()
as a method.
References:
Resolving java.lang.AbstractMethodError, Error creating bean with name 'entityManagerFactory' in Spring
Migrating To Hibernate 5 from 3
The following dependency was added,
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-java8</artifactId>
<version>5.4.2.Final</version>
</dependency>
I removed the org.jadira.usertype
, joda-time
dependencies from my pom.xml . However, my POJOS/Spring Beans were designed to consume those dependencies, i.e. with the @DateTimeFormat
annotation
@Entity
@Table(name = "APPLICANTS_EDUCATION")
public class ApplicantEducation implements Serializable{
private static final long serialVersionUID = 1L;
@Column(name = "EDUCATION_TITLE")
private String educationTitle;
@Column(name = "SCHOOL_NAME")
private String schoolName;
@NotNull
@DateTimeFormat(pattern = "DD/MM/YYYY")
@Column(name = "START_DATE", nullable = false)
@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
private String startDate;
The Annotation @Type
and the object type were changed
@NotNull
@DateTimeFormat(pattern = "DD/MM/YYYY")
@Column(name = "START_DATE", nullable = false)
@Type(type = "org.hibernate.type.LocalDateTimeType")
private LocalDateTime startDate;
@DateTimeFormat(pattern = "DD/MM/YYYY")
@Column(name = "END_DATE")
@Type(type = "org.hibernate.type.LocalDateTimeType")
private LocalDateTime endDate;