Questions tagged [hibernate-4.x]

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

302 questions
0
votes
1 answer

Auto Generating Classes for tables without any xml files

I have a DB with around 50+ tables. I plan to use spring-boot(1.2.4) with hibernate 4.3.10.Final and Java8 in my new project. Using Eclipse Luna SR2 as my IDE. If i generate classes for tables using hibernate tool, they generate Classes and also…
Rajkishan Swami
  • 3,569
  • 10
  • 48
  • 68
0
votes
1 answer

Issues with upgrading Hibernate 3 to hibernate 4

I have been upgrading my project from Hibernate 3.x version to Hibernate 4.1.4. Now I have a peculiar problem with me. After placing all the required JARs and referring them on the classpath, builing java.lang.NoClassDefFoundError:…
Pavan Kumar
  • 463
  • 2
  • 10
  • 18
0
votes
1 answer

HQL syntax error

mysql 5.1 hibernate 4.3 spring 4 glassfish 4 I have written a application using spring and hibernate. It gives following error. ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the…
chamikaWKK
  • 21
  • 2
  • 7
0
votes
1 answer

Get LobHelper from a UserType context

I'm migrating old Hibernate 2.x code to 4.x. One of the classes is a UserType between byte[] and Blob, and the code does something like this: public void nullSafeSet(...) { ... Blob blob = Hibernate.createBlob(bytes); ... } In Hibernate…
AndresQ
  • 803
  • 5
  • 19
0
votes
0 answers

Hibernate Unable to lookup JNDI name exception

Please suggest me any configuration changes required or any suggestions welcome When i tested same code with hibernate 4.3.8 and tomcat 6.0 : I'm testing with one bean and one table, got the Unable to lookup JNDI name exception as below Found the…
0
votes
1 answer

HIbernate 4.2 No active transaction for PuId

I have web application with JPA (Hibernate 4.2), JavaEE 7 which is running on WebSphere 8.5. I want to avoid using EJB in my app. And when I am trying to persist changes i get javax.persistence.TransactionRequiredException: No active transaction for…
user18190
  • 23
  • 5
0
votes
1 answer

Hibernate lazy initialization not working with Jackson Mapper

I am using Spring 4 and Hibernate 4. I am using java jpa to use hibernate. I want to load few data lazily. And I have also configured Jackson mapper to convert my java object to json and vice versa. But it's throwing exception while converting the…
aviundefined
  • 802
  • 2
  • 10
  • 25
0
votes
1 answer

How to log SQL statement made by hibernate 4 in JBoss EAP 6.3

I am currently developping a small webapplication wich i deploy on JBoss EAP 6.3.0.GA (version 7.4.0.Final-redhat-19). This application use hibernate as its JPA provider (hibernate version 4.2.14.SP1-redhat-1) and it also use an EJB between the…
lionelh
  • 3
  • 1
  • 2
0
votes
1 answer

Spring 4.1.5.RELEASE fails to do dependency injection for SessionFactory of Hibernate 4.3.8.Final

Question is not a duplicate as Hibernate is involved As the James' answer partially solved the problem, I accepted it and opened a new question, please follow up here I am trying to inject SessionFactory into a repository class; however, it looks…
Jack
  • 6,430
  • 27
  • 80
  • 151
0
votes
1 answer

Why Hibernate 4.3.7.Final saveOrUpdate fires update after every insert ?

In earlier version of Hibernate , saveorUpdate fires insert or update query based on the entity. But in hibernate 4.3.7 fires update query after every insert.I see both insert and update query. Domain Object import java.io.Serializable; import…
Mahesh
  • 248
  • 4
  • 19
0
votes
3 answers

hibernate.cfg.xml cannot be resolved to URL because it does not exist. Spring MVC Hibernate web app error

I am following this tutorial https://www.youtube.com/watch?v=rdYQOqxq9F0 Building Eclipse Maven project for Web App, using Spring-MVC and Hibernate with MySQL. Using Apache Tomcat 8 as server. After many hours trying to solve this, I am…
0
votes
1 answer

hiberate 4.3 - entity class instances not returned in list

I am using Hibernate 4.3.8 without Spring. I am using Hibernate's session API. I have one entity class Category which I have annotated properly with @Entity, @Table, @Id, @Column and so on. I don't use .hbm.xml descriptor files, I just want to use…
peter.petrov
  • 38,363
  • 16
  • 94
  • 159
0
votes
1 answer

How do I specify @Orderby for a Set in JPA

How do I specify @OrderBy for a Set? I want to force Hibernate to use it's persistence set that's backed by Treeset, and my understanding is that I need to use @OrderBy to trigger that.
Jazzepi
  • 5,259
  • 11
  • 55
  • 81
0
votes
2 answers

One-To-Many Hibernate Entity Mapping : ids for this class must be manually assigned before calling save()

I am a new bee in Hibernate and I am using PostgreSQL 9.3, JDK 1.7, Hibernate 4.0.2 I am trying to save a Customer who Has-a relationship with Address i.e., One-To-Many Relation. While saving the Customer i am getting the…
09Q71AO534
  • 4,300
  • 13
  • 44
  • 68
0
votes
1 answer

Data not retrieving after saving in database in hibernate 4

I am using Hibernate 4 with Spring 4. I have created my own session factory and used Hibernate Transaction Manager. I have a problem while retrieving the data after saving. I am saving the data using ProcedureCall and in every method I am opening…
Balkrushn
  • 91
  • 1
  • 1
  • 12