Questions tagged [hibernate-4.x]

Represents the 4.x release of the Hibernate Object/Relational Mapping project

302 questions
123
votes
11 answers

How do you configure logging in Hibernate 4 to use SLF4J

Hibernate 3.x used slf4j for logging. Hibernate 4.x uses jboss-logging. I am writing a standalone application which uses Hibernate 4, and SLF4J for logging. How can i configure Hibernate to log to SLF4J? If that's not possible, how can i configure…
Tom Anderson
  • 46,189
  • 17
  • 92
  • 133
88
votes
9 answers

NoSuchMethodError in javax.persistence.Table.indexes()[Ljavax/persistence/Index

I have a Play Framework application and I was using Hibernate 4.2.5.Final (which is retrieved via the Maven dependency manager). I decided to upgrade to Hibernate 4.3.0.Final, recompile my application successfully, and ran it. I got the exception…
musubi
  • 1,256
  • 3
  • 14
  • 22
37
votes
4 answers

Getting error Could not locate appropriate constructor on class

I am trying to map native SQL result to my POJO. Here is the configuration. I am using spring.
Basit
  • 8,426
  • 46
  • 116
  • 196
37
votes
5 answers

How to start spring-boot app without depending on Database?

I am using "Spring-boot + Hibernate4 + mysql" for my application. As part of which I have a requirement where my sprint-boot app should be able to start even when database is down. Currently it gives the below exception when I try to start my spring…
Ripu Daman
  • 2,482
  • 2
  • 18
  • 22
35
votes
7 answers

Hibernate : No CurrentSessionContext configured

I'm stuck due to some silly mistake somewhere but not able to figure out ! Hibernate 4.2.6 I have referred to this question, asked several times previously, for example here hibernate.cfg.xml
Kaliyug Antagonist
  • 3,512
  • 9
  • 51
  • 103
33
votes
5 answers

"Found: bit, expected: boolean" after Hibernate 4 upgrade

I'm trying to upgrade from Hibernate 3.6.5 to 4.0 (and from Spring 3.0.5 to 3.1 which is required for Hibernate 4 support). Now, with both MySQL and HSQL, I'm running into this problem with persistent boolean fields: Caused by:…
Jonik
  • 80,077
  • 70
  • 264
  • 372
33
votes
4 answers

org.hibernate.HibernateException: No Session found for current thread

I'm getting the above exception with Spring3 and Hibernte4 The following is my bean xml file
Can't Tell
  • 12,714
  • 9
  • 63
  • 91
27
votes
5 answers

What does HHH000387 Hibernate warning mean?

I have just updated to Hibernate 4.0 and am seeing the warning message : HHH000387: ResultSet's statement was not registered in my log files. What does this mean, and should I be worried?
stevemac
  • 2,534
  • 5
  • 27
  • 36
21
votes
4 answers

eventlisteners using hibernate 4.0 with spring 3.1.0.release?

These jars are both new released and have the latest solutions for Java EE applications. But I have a problem on specifiying hibernate listeners in hibernate.cfg.xml. Before spring 3.1.0, LocalSessionFactroyBean was holding an attribute that keeps…
asyard
  • 1,743
  • 5
  • 21
  • 43
18
votes
14 answers

No Session found for current thread (Spring 3.1.X and Hibernate 4)

I'm trying to set up my project using Spring 3.1 and Hibernate 4. I've been following some tutorials online. I'm getting a strange error that according to the spring forums should have been fixed with Spring 3.1. Spring Bug Tracker When my…
It Grunt
  • 3,300
  • 3
  • 21
  • 35
16
votes
6 answers

java.lang.ClassNotFoundException: org.hibernate.engine.transaction.spi.TransactionContext

I am developing Spring MVC Hibernate Integration example. In this example I'm using Spring 4.1.9.RELEASE and Hibernate 5.1.0.Final. If I downgrade Hibernate version to 4.3.5.Final then it works. Now inorder to use hibernate 5 what else configuration…
user5778069
14
votes
1 answer

Grails Hibernate4 upgrade errors on getGeneratedKeys()

I'm upgrading to the Hibernate4:4.3.5.3 plugin for Grails 2.3.9 . However, I'm getting an error: getGeneratedKeys() support is not enabled I haven't been able to find any configuration details on how to enable this.
Brandon Wagner
  • 893
  • 9
  • 27
13
votes
3 answers

Hibernate 4 ClassCastException on LAZY loading while EAGER works fine

I have the following JOINED inheritance root entity for geographic areas (like continents, countries, states etc.): @Entity @Table(name = "GeoAreas") @Inheritance(strategy = InheritanceType.JOINED) public abstract class GeoArea implements…
Kawu
  • 13,647
  • 34
  • 123
  • 195
12
votes
2 answers

How do I get unit test to run in java 7: java.lang.VerifyError: Expecting a stackmap frame at branch target

Hi I am running a maven test using maven 3.0.3 with hibernate 4.0.0 Final release and spring 3.1 on jdk7 update 2. I get the following error. Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 63 in method…
Chun ping Wang
  • 3,879
  • 12
  • 42
  • 53
12
votes
1 answer

NoCacheProvider class alternative in Hibernate 4

I've just realized that there is no org.hibernate.cache.internal.NoCacheProvider class in Hibernate 4 Core packages. Maybe it is deprecated. So is there any alternive for Hibernate 4? Thank you in advance!
sidlejinks
  • 709
  • 1
  • 9
  • 25
1
2 3
20 21