Category "hibernate"

JPA (Hibernate) Native Query for Prepared Statement SLOW

Having strange performance issue using Hibernate 3.3.2GA behind JPA (and the rest of the Hibernate packages included in JBoss 5.) I'm using Native Query, and a

Creating JPA session for background threads

We use Hibernate through JPA and Spring to manage object persistence in our web application. We use open-session-in-view pattern to create sessions for threads

Ignore fields from Java object dynamically while sending as JSON from Spring MVC

I have model class like this, for hibernate @Entity @Table(name = "user", catalog = "userdb") @JsonIgnoreProperties(ignoreUnknown = true) public class User imp

Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set.

I am getting exception even after setting hibernate.dialect property. I am using hibernate 5.0.11 with spring boot 1.4.2 and mysql version as 5.7 application.p

Hibernate : Why is it trying to drop/create database on startup?

I'm new with Spring. I finally succeeded to build my application with no error but when i'm looking to the output i have a lot of information that i don't under

Getting a nullpointerexception for my EntityManager

Working with Wildfly 10 on the following: a JSON webservice accessing a postgresql db using hibernate through a DAO object. More specifically, my POJO User.jav

Calling Hibernate in background threads in grails

I am trying to create a specific type of background processing setup in a grails application. A fixed size thread pool exists only for the duration of the batc

Hibernate not persisting enums (as String)

I'm trying to do simple thing, save with Hibernate enum value as string. My mapping looks like this: @Entity @Table(name = "CONTRACTOR") public class Contracto

How to fix org.hibernate.LazyInitializationException - could not initialize proxy - no Session

I get the following exception: Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hiberna

not-null property references a null or transient value

Facing trouble in saving parent/child object with hibernate. Any idea would be highly appreciated. org.hibernate.PropertyValueException: not-null property refe

Spring Hibernate Jackson Hibernate5Module

I have set up spring 4.3.1 with Hibernate 5.1.0 and Jackson 2.7.5 I had some lazy init Exceptions because the Jackson ObjectMapper tries to convert my Objects

Hibernate cascade save parent and children - parent key not found

I am using Spring, Hibernate and oracle for a project. The database schema was created manually by running sql script. Everything works fine until I encountered

org.hibernate.QueryParameterException: could not locate named parameter [userId]

I need help, I am getting the aforementioned exception. Where am I going wrong? In the mapping from class to table, I have used the following: private String u

Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView

Why am I getting this exception? package com.domain.idea; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.Fetc

How to read geography values using hibernate?

In my spring boot application, I am trying to store spatial data using spring data with hibernate (jpa). Full source code of minimal reproducing example is avai

Hibernate: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

I am attempting to deploy an application on a glassfish 4 server on my local machine. When I copy the .war file into the autodeploy directory, the glassfish log

How to run gradle based spring boot application in background using command line in ubuntu?

I am trying to run gradle based hibernate spring boot application in background thread.

Error creating bean with name 'entityManagerFactory'

I have a web application that uses spring, hibernate and JPA. When I want to run my DAO unit tests, I get the following error: Caused by: org.springframewo

Using @Fetch(FetchMode.Join) in Hibernate

I have two classes, Test2 and Test3. Test2 has an attribute test3 that is an instance of Test3. In other words, I have a unidirectional OneToOne association, wi