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
0
votes
1 answer

Hibernate 5 : can't find config file

I'm discovering Hibernate today, and I'm struggling while trying to make a minimal program find my "hibernate.cfg.xml" configuration file. Here is what I already tried : My main : package testHibernate; import…
Alann S.
  • 125
  • 12
0
votes
1 answer

Hibernate 5 on GAE: NoClassDefFoundError: javax.naming.StringRefAddr is a restricted class

After migration from Hibernate 4.3.11.Final to 5.0.6.Final I receive the following exception: [INFO] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in…
Marek Raki
  • 3,056
  • 3
  • 27
  • 50
0
votes
1 answer

Hibernate 5 gives error: must have same number of columns as the referenced primary key

I have been migrating from hibernate 4 to hibernate 5. It is ok in hibernate 4, but doesn't work in hibernate 5. I am getting exception: Caused by: org.hibernate.MappingException: Foreign key (FKf6eo63yo42ylh7vl5klap2eum:ProductParent…
user657009
  • 722
  • 2
  • 6
  • 18
0
votes
2 answers

Hibernate 5 Transaction not started by Spring 4

Based on this tutorial, I was trying to manage Hibernate 5 transactions with Spring 4. It seems that the transaction has not been started when session.get() method is reached. How does Spring knows when to start and end a transaction? Shouldn't the…
Jose Ospina
  • 2,097
  • 3
  • 26
  • 40
0
votes
0 answers

Hibernate 5 dynamic number of database

I have got a question about multiple db support of Hibernate. I have 1000s of customers distributed on multiple db servers. Each server has got around 500 Dbs. So every customer has its own database (the schema of all are exactly the same, they just…
0
votes
1 answer

Adding Integrator in Hibernate 5.0.3

I am trying to register an Integrator in Hibernate 5.0.3 to trigger a particular EventListener. I am modifying one of the examples supplied in the Hibernate Getting Started Guide. The original jUnit Test Class that works well is the following: …
rocotocloc
  • 418
  • 6
  • 19
0
votes
0 answers

Spring-JPA-MVC-Hibernate Session per Request with Java Config

I have a spring-jpa-mvc-rest-hibernate web application that I use Java Config almost 99% on the whole app. How can I configure Session per Request on pure Java Config? Preferable not using hibernate specific code, if that is possible. I'm using…
ElMangau
  • 51
  • 2
  • 6
0
votes
2 answers

Spring 4 and Hibernate 5 gives NoSuchMethodError org.hibernate.internal.CoreMessageLogger

So, I had a successful Spring 4.2.2.RELEASE MVC web-app working with Hibernate 4.3.8.Final. I changed to Hibernate 5.0.2.Final, and I made the following changes to my spring application context file. From:
tjholmes66
  • 1,850
  • 4
  • 37
  • 73
0
votes
1 answer

Should session and factory be closed?

I'm using Hibernate 5.0.2.Final with a Data-Source connection (On a Tomcat 8.0.15) and started to ask myself if it's necessary to not only close the Session but also the SessionFactory? Right now it looks like this: public static List
Qohelet
  • 1,459
  • 4
  • 24
  • 41
0
votes
0 answers

jboss Services which failed to start

During deployment to jbosss 7.2.final, the ear project received the following error exception: JBAS014777: Services which failed to start: service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex- ejb-1.0.jar#MorfeusflexPU":…
Devloper
  • 120
  • 3
  • 14
0
votes
1 answer

Spring migration 4.1.X to 4.2.x 2nd level caching issue for method LocalSessionFactoryBean.setCacheRegionFactory(RegionFactory cacheRegionFactory)

I`m upgrading project from Spring-4.1.6.RELEASE to Spring-4.2.1.RELEASE and Hibernate (core and Ehcache) from 4.3.9.Final to 5.0.1.Final. In Spring-4.1.6.RELEASE, there is a…
Nirav Patel
  • 1,304
  • 2
  • 13
  • 30
0
votes
0 answers

Jersey REST web service with Hibernate causes NoSuchMethodError on JBoss EAP 6.4

I'm trying to create a very simple Jersey REST webservice project with Hibernate 5. The problem is that when I debloy the WAR-file to JBoss EAP 6.4, I'm getting following exception: "The exception contained within MappableContainerException could…
Henrik
  • 1
  • 1
0
votes
2 answers

JPA 2: Order by not working in ManyToMany with extra fields

I have a ManyToMany which I have mapped like this question. Please note, I have removed boilerplate for simplicity @Entity class Person { @OneToMany(mappedBy = "person") @OrderBy("sort") private List adresses = new…
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
0
votes
1 answer

Hibernate 5 with annotation

Can we use JPA annoation to perist domain model (classes , relations and heritage) instead of hbm configuration, and then use Sessionfactory to make CRUD operations. I means that is it possible do use annotation without using persistence.xml and…
Yosr
  • 3
  • 1
  • 3
0
votes
0 answers

Hibernate 5 Spatial Unable to make DB connection

I am struggling hard to get the DB Connection with my POST GIS spatial data. Issue is with application context is not getting generated. Everytime JUnit gets failed. I am using Hibernate 5 as it is supporting Hibernate-Spatial as well as other java…
Praveen Kumar
  • 190
  • 5
  • 15
1 2 3
24
25