hibernate Questions

6

I keep getting org.hibernate.AssertionFailure: null identifier when trying to create an object. My classes are as follows: public class User { @Id @Column(name = "user_id", nullable = false) p...
Peyote asked 13/2, 2015 at 20:40

4

I have a Spring Boot App using an Oracle Data source that is freezing on startup. The last messages outputted on the console are: [2017-12-18T15:34:19,425] INFO org.hibernate.dialect.Dialect HHH00...
September asked 18/12, 2017 at 20:36

1

Solved

I have a Java Spring application with lots of queries, which so far have worked until spring boot 3.2.0. Recently, after simply changing to spring boot 3.2.1, I started getting this kind of error: ...
Dentilabial asked 16/1 at 2:52

2

I have a Class: public class ProductComercialOrderDAO extends BaseDao implements ProductComercialOrderDAOLocal { private final static Logger log = UtilsBusiness.getLog4J(ProductComercialOrderDA...
Saffier asked 24/10, 2016 at 21:5

3

By default, my Spring Boot project had JPA mapping entity properties to table columns by transforming the names from camelCase to snake_case (e.g. from fooBar to foo_bar). I'm working on an existi...
Rhiamon asked 14/6, 2018 at 13:29

25

Solved

I want to log SQL statements to a file. I have the following properties in application.properties: spring.datasource.url=... spring.datasource.username=user spring.datasource.password=1234 spring.d...
Effeminate asked 8/5, 2015 at 7:55

5

Solved

My problem is as follows: When i create POST request in "Postman" app. This is what i try to POST {"name": "John Doe", "email":"[email protected]", "city": "London"} I am getting the foll...
Stride asked 19/11, 2018 at 20:28

5

Getting the following error when trying to run a spring mvc application with hibernate in eclipse. java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer org.spring...
Dunc asked 20/9, 2012 at 9:16

1

I am writing a simple HQL to find out the employee who is having highest salary based on department. In the output I am expecting employee name, department name and highest salary. Here are my ent...
Testy asked 7/5, 2016 at 12:49

7

Solved

We have Spring-boot/Hibernate/PostgreSQL application in our project and use Hikari as the connection pool. We keep running into the following problem: after few hours active connections number grow...
Pinnatifid asked 6/10, 2015 at 11:14

6

Solved

I have the following entity: @Entity @Table(name = "campaign_content", uniqueConstraints = @UniqueConstraint(columnNames = { "campaignContentId", "campaignId", "fieldTag" })) public class Campaig...
Thormora asked 7/11, 2011 at 19:44

4

Solved

I'm trying out IntelliJ IDEA and it's warning me of a Hibernate association that I don't quite understand. One Side: @Entity @Table(name = "MY_REQ_ASSIGNEE") public class MyRequestAssignee exten...
Chromous asked 20/8, 2015 at 16:38

4

Solved

What's the use of @Embedded and @Embeddable In Hibernate ? Because every example i found on internet is inserting data inside of a single table and to do that using two different class. My point is...
Erythrocytometer asked 13/10, 2013 at 4:23

43

Solved

When I compile my spring project, I got the following error. Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa...
Opalescent asked 15/10, 2016 at 10:40

2

Solved

I use code like to export JPA entities schema DDL : import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.hbm2ddl.SchemaUpdate; public class HibernateQueryGenerator { public s...
Selestina asked 17/10, 2022 at 9:38

16

Solved

I have a problem with Hibernate. I try to parse to List but It throws an exception: HTTP Status 500 - could not extract ResultSet. When I debug, It fault at line query.list()... My sample code he...
Rimple asked 20/11, 2013 at 6:32

5

Solved

I have a data table with columns setup and release, both of which hold timestamps. My goal is to create an equivalent of the SQL query below using CriteriaQuery. SQL Query:SELECT TIMESTAMPDIFF(SEC...
Principal asked 14/3, 2014 at 17:46

7

Getting this error when jpa tries to fetch the object from database. Error : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nest...
Irreligious asked 31/7, 2021 at 14:4

20

Solved

In the custom AuthenticationProvider from my spring project, I am trying read the list of authorities of the logged user, but I am facing the following error: org.hibernate.LazyInitializationExcep...
Cathodoluminescence asked 2/4, 2014 at 19:56

17

having more issues with seting up hibernate with spring3. this time it is saying that connection is nul as the dialect is not set which it is on my hibernate.cfg.xml file. here is the full excepti...
Samanthasamanthia asked 26/6, 2012 at 16:5

4

Solved

For instance if I do something like: Criteria c = session.createCriteria(Book.class) .add(Expression.ge("release",reDate); .add(Expression.ge("price",price); .addOrder( Order.asc("date") ) .se...
Alter asked 12/3, 2010 at 15:55

12

Solved

I am attempting to map the results of a Native query to a POJO using @SqlResultSetMapping with @ConstructorResult. Here is my code: @SqlResultSetMapping(name="foo", classes = { @ConstructorResul...
Blumenfeld asked 7/8, 2014 at 17:48

4

I am currently working through the example on scheduling tasks using Spring 4, Java 1.8, and Gradle (https://spring.io/guides/gs/scheduling-tasks/). However, when running this example, I receive t...
Comanchean asked 13/12, 2016 at 19:59

3

Hi I am working with saving Image into DB,I am Taking Image as Multipart and trying to convert into Blob type. I do this method: Blob blob=Hibernate.getLobCreator(sessionFactory.getCurrentSession(...
Ancelin asked 6/8, 2013 at 7:3

4

I have table product_spec_entry with following columns: product_spec_id commodity_spec_id for one product_spec_id may be several commodity_spec_id, for example: |product_spec_id | commodity_sp...
Colwin asked 13/10, 2016 at 12:26

© 2022 - 2024 — McMap. All rights reserved.