Questions tagged [hibernate-5]

24 questions
0
votes
0 answers

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration Exception

I am learning Hibernate and tried a simple program. I used Hibernate 5.3 version and added all the Hibernate required .jar files to the build path. I can find the Configuration class in the ref libraries folder, still getting the exception. Is there…
0
votes
1 answer

JPA/Hibernate does not properly find the database schema of a non-XA data source in Wildlfy 24.0.1.Final/Hibernate 5.3.20

Issue description I am migrating a project from Wildfly 8.2.1.Final to a newer version. The main objectives are to use Hibernate 5 with Java 8+ and to run on a Wildfly version compatible with java 11, for later migration (thus the problem arises…
LaurentV
  • 61
  • 1
  • 4
0
votes
5 answers

java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped

I know this has been asked many times, but none of the answers have solved the problem so far. My code was working perfectly for years up until I upgraded from Hibernate 4.3.11 to Hibernate 5.2.0. Now I'm getting the following…
IntelliData
  • 441
  • 6
  • 29
0
votes
0 answers

How to lock() a JPA/Hibernate entity when all one has is that entity (no EntityManager/Session)?

I am dealing with some legacy code that, in places, does not have a clean and reliable way of obtaining a JPA EntityManager (or Hibernate Session) for a given entity as needed to invoke a lock(...) method on. Essentially we have a method in an…
Learner
  • 1,215
  • 1
  • 11
  • 26
0
votes
1 answer

How can I add custom db objects during schema generation with Grails 4.0.5 (Hibernate 5) without the need for migration plugin?

I need to add a couple functions and views that are part of the system schema design. This should be part of the session start up (especially in development and test) because of the dbCreate create-drop settings on the data source so that the…
0
votes
1 answer

Date Functions in hibernate 5 HQL

So I'm kind of new to hibernate, hence just bear with me here. I have a mysql query like so: SELECT SUM(PLAN_ID), USER_ID FROM TABLE_A WHERE ACTIVATION_DATE BETWEEN DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 2 MONTH)), INTERVAL 1 DAY)…
Zaire
  • 67
  • 7
0
votes
0 answers

issues with hibernate.hbm2ddl.auto = validate in hibernate 5

I am trying to update my project from spring 3 to 4 and hibernate 3 to 5.when i run my application, validate causes following exception Caused by:…
Sai
  • 49
  • 5
0
votes
1 answer

Unable to get CDI working in Weblogic 12c, hibernate 5.2.4, hibernate-validator/cdi 5.3.1

My env: weblogic 12c with jpa2.1 patch that sets: SET PRE_CLASSPATH=%MW_HOME%\oracle_common\modules\javax.persistence_2.1.jar;%MW_HOME%\wlserver\modules\com.oracle.weblogic.jpa21support_1.0.0.0_2-1.jar my-ear/APP-INF/lib…
donlys
  • 440
  • 6
  • 13
-2
votes
1 answer

javax.ejb.EJBTransactionRolledbackException at com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2342)

Getting issue while accessing local beans EJB3, Hibernate 5, JPA2, Glassfish Searched on internet but didn't found any solution. I recetly moved code from jpa2.0, hibernate4 to jpa 2.1 and hibernate5. Also changed glassfish 3.0 to 4.1.2. Earlier it…
1
2