Questions tagged [hibernate-5.x]

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

For more details on Hibernate version 5.x view Hibernate ORM Roadmap

368 questions
6
votes
3 answers

Consider defining a bean of type 'javax.persistence.EntityManagerFactory' in your configuration

I am using Spring Boot 2.0.0.RC1 (It include Spring Framework 5.0.3.RELEASE), Hibernate 5.2.12.Final, JPA 2.1 API 1.0.0.Final . I have a class package com.example; import org.hibernate.SessionFactory; import…
Vy Do
  • 46,709
  • 59
  • 215
  • 313
6
votes
2 answers

Spring Boot 2.0.0.M4 & Hibernate 5.2.11.Final could not find bean of type EntityManagerFactoryBuilder

I have clearly what seems to be some configuration issue, but I've been unable to resolve this myself. I have hope you guys could help me? None of the examples I find indicate having to create a bean for EntityManagerFactoryBuilder so what's the…
eztinkerdreams
  • 381
  • 2
  • 3
  • 17
6
votes
3 answers

Grails (Hibernate) Mapping of java.time.ZoneId to Database

Is there any way how to support persistent mapping of java.time.ZoneId to string in Hibernate 5.1.1. It saves the ZoneId in binary form right now. I've just upgraded to Grails 3.2.1 which has Hibernate 5.1.1. Saving of java.time.Instant for example…
kuceram
  • 3,795
  • 9
  • 34
  • 54
6
votes
1 answer

Hibernate 5 doesn't handle LocalDate properly

We're migrating our Hibernate (5.0.2) code to Java 8, which also involves conversion from java.util.Date to java.time.LocalDate (to solve issues related to date handling in Java 7). One of the problems I've run into is how Hibernate handles a…
yktoo
  • 2,696
  • 1
  • 23
  • 35
6
votes
1 answer

Migrating To Hibernate 5 from 3

I am migrating to Hibernate 5.0.3.Final from 3. In 3.x I am using joda-time to persist LocalDateTime in oracle DB. Now I am seeing that hibernate 5 doesn't have a support to joda-time. Please let me know what would be the best alternative for…
Sydubabu
  • 181
  • 3
  • 11
6
votes
2 answers

spring hibernate 5 Error Already value [org.springframework.orm.hibernate5.SessionHolder for key bound to thread

I am just upgrading to hibernate 5 and facing the below error when trying to getCurrentSession with Spring Hibernate transaction manager org.springframework.orm.hibernate5.HibernateTransactionManager Here is the full stack trace of the…
Meenakshi Shri
  • 341
  • 2
  • 7
6
votes
3 answers

Table not created with hbm2ddl.auto=update in Hibernate 5

The database table is NOT auto-created by the update settings in hibernate-cfg.xml, with the following combination: Java 8 + Tomcat 8 + MySQL + Hibernate 5 Java version: java version "1.8.0_45" Java(TM) SE…
Ming
  • 61
  • 1
  • 4
6
votes
1 answer

Migrate from Hibernate 4.3.6 to Hibernate 5

I have old project where I use Date from Java API, and I want change this to new Java 8 Date API to LocalDateTime. I read that Hibernate version before 5 does not support the new Java 8 Date API, and I decided to migrate from Hibernate 4.3.6 to 5.…
The Nightmare
  • 701
  • 5
  • 16
  • 36
6
votes
1 answer

How to solve AbstractMethodError in Hibernate 5?

i'm trying to use the hibernate 5 in Java EE with tomcat 7, and i'm getting this…
Mihael Zamin
  • 195
  • 1
  • 1
  • 9
5
votes
2 answers

NullpointerException with hql query in Hibernate NameGenerator

i have an issue with hql queries which contain a null in the select, for example: "select firstname, lastname, null from Employer" The Nullpointer comes from: Caused by: java.lang.NullPointerException at…
Johannes Hinkov
  • 761
  • 8
  • 9
5
votes
3 answers

What does "org.hibernate.DuplicateMappingException: Duplicate query mapping" mean in Hibernate

I am trying to run a Spring webapp using hibernate 5.2.16 with struts2-core-2.3.35 on Tomcat8.5 with JDK8. I am getting the below exception : Caused by: org.hibernate.DuplicateMappingException: Duplicate query mapping getDocExt at…
DockYard
  • 989
  • 2
  • 12
  • 29
5
votes
2 answers

@NotNull annotation does not translate to not null constraint in schema generation

According to hibernate validator reference documentation - Section 11.1.1. Database schema-level validation (https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#validator-checkconstraints-db), Out of the box, Hibernate…
5
votes
0 answers

org.hibernate.criterion.Example use with CriteriaQuery

I have following code that I need to refactor for use in hibernate 5. This includes removing every deprecated call. public List findByExample(T example, String... excludeProperty) { Criteria crit = session.createCriteria(T.class); …
XtremeBaumer
  • 6,275
  • 3
  • 19
  • 65
5
votes
2 answers

Why does Hibernate 5 sequence generator use the default hibernate.seq instead of my sequence?

Aftre migrate my application from hibernate 4 to hibernate 5 .my sequence dose not work and hibernate use our default sequence instead of my sequence .my mapping config in hbm like this my database is oracle .
ali akbar azizkhani
  • 2,213
  • 5
  • 31
  • 48
5
votes
1 answer

How to configure 'entityCacheStrategies' in spring4.3.x

I am migrating from spring3.x to spring4.3.x. I am using org.springframework.orm.hibernate5.LocalSessionFactoryBean in bean creation as follows
Achaius
  • 5,904
  • 21
  • 65
  • 122