Represents the 4.x release of the Hibernate Object/Relational Mapping project
Questions tagged [hibernate-4.x]
302 questions
0
votes
1 answer
No Session found for current thread (Spring 4.0.5.RELEASE and Hibernate 4.3.5.Final)
I've seen several similar questions, but none of the suggested solutions helped me.
I am migrating my application from Spring 3.0.5.RELEASE to 4.3.5.Final, and Hibernate 3.6.0.Beta2 to 4.3.5.Final. Application has been working perfectly fine in…

BAhmed786
- 51
- 5
0
votes
1 answer
Get lazy children set by Criteria
I have a Parent class and a Child class with the current setup
@Entity
public class Parent {
@OneToMany(mappedBy = "parent")
private Set children;
@Column
private int type;
}
@Entity
public class Child {
@ManyToOne
…

Thai Tran
- 9,815
- 7
- 43
- 64
0
votes
1 answer
Hibernate 4 + org.hibernate.MappingException: Unknown entity
I am using Spring MVC 3 and Hibernate 4
Below is code to perform DAO operations
@Repository("headCategoryDao")
@Transactional
public class HeadCategoryDaoImpl extends CustomHibernateDaoSupport implements HeadCategoryDao {
…

Rahul Agrawal
- 8,913
- 18
- 47
- 59
0
votes
1 answer
Logging queries from Hibernate 4.3 (with SLF4J+Logback or P6SPY)
I am using Glassfish 4 and Hibernate 4.3.
How can I log every query from Hibernate?
My first try involved SLF4J 1.7.7 and Logback 1.1.2.
I have tried some tutorials using SLF4J and Logback, but with no results.
One tutorial said to change some files…

MiguelKVidal
- 1,498
- 1
- 15
- 23
0
votes
1 answer
Prevent closing ResultSet on transaction commit
I must preserve a ResultSet which was opened within a @Transactional Controller, to be consumed within a MessageConverter. To that end I have configured the following:
MVC Interceptor:

Marko Topolnik
- 195,646
- 29
- 319
- 436
0
votes
1 answer
Spring4 with Hibernate4 fails in standalone process
I'm failling to use Spring4 togather with Hibernate4 in a standalone process (no container like tomcat, WAS, ...)
How can I use Hibernate4, Spring4 and Spring data repositories togather in a standalone process?
However I confiugre Spring I allways…

domi
- 2,167
- 1
- 28
- 45
0
votes
2 answers
Exception in thread "main" org.hibernate.MappingException: invalid configuration in hibernate4
I am stuck with hibernate configuration file exception, this is my hibernate.cfg.xml file:

user3428394
- 1
- 1
- 1
0
votes
1 answer
How to acquire one field of an entity which comes from a select statement, on hibernate 4?
I am working on an application in which there are users with regular fields such as userId, name etc., additionally users also have score and rank. rank is calculated on request, depending on the score of the user. it actually is the order of the…

hevi
- 2,432
- 1
- 32
- 51
0
votes
1 answer
One to one mapping between existing table and new table in hibernate
I have two tables user and authority table which are one-to-one mapped over shared Primarykey.
Now I want to have a one(user) to many(logdetail) between existing user table and a new table logdetail.
Basically this is what I want to achieve…

day_dreamer
- 824
- 3
- 13
- 33
0
votes
1 answer
NoSuchMethodError: openSession() while migrating Hibernate
I'm doing Hibernate migration.
Just changed Hibernate.3.jar to Hibernate.4.3.1.jar which gave me 2 errors
1)Why Hibernate STRING can not be resolved?
2)While calling sessionFactory.openSession()
java.lang.NoSuchMethodError:…

Suresh Atta
- 120,458
- 37
- 198
- 307
0
votes
3 answers
Hibernate3 --> Hibernate 4 and issues (Lazy...)
I'm trying to update the libraries of my project (from Hibernate 3.2.1 GA to Hibernate 4.2.8)
This (complex) application use LAZY loading and get the object later only when we need it.
-->it seems to work differently now because I get some…

stof
- 1
- 1
0
votes
2 answers
Spring MVC + Hibernate
i've a problem with hibernate configuration in Spring.
My project is a repository project. This is pom.xml:

user2992626
- 11
- 3
0
votes
2 answers
Class 'org.springframework.web.servlet.view.InternalResourceViewResolver' not found
I'm getting the below error.
Multiple annotations found at this line:
Class 'org.springframework.web.servlet.view.InternalResourceViewResolver'
not found
Class 'org.springframework.web.servlet.view.InternalResourceViewResolver'
not found…

Anand Chavan
- 4,338
- 6
- 23
- 27
0
votes
1 answer
why after Hibernate4 save() the database will change?
why after execute such code without flush(),database will change?
public static void main(String args[]){
ApplicationContext ac = new FileSystemXmlApplicationContext("src/main/resources/config/spring/spring-common.xml");
SessionFactory…

LTzycLT
- 489
- 1
- 5
- 13
0
votes
1 answer
Spring / Hibernate 4(non JPA) / Infinispan / Atomikos no transaction manager found
I'm using Tomcat7 and need JTA for Infinispan Cache. I am using Spring 3.x with Hibernate 4 (non JPA) and Atomikos for JTA. I can't find a transaction manager look up class in the Atomikos library or docs for Hibernate 4. All examples are for…

user979051
- 1,257
- 2
- 19
- 35