Category "hibernate"

Bad type on operand stack error when using hibernate

I am getting an error when using the hibernate. This is the stack trace:- java.lang.VerifyError: Bad type on operand stack Exception Details: Location: o

No Dialect mapping for JDBC type: 1111

I'm working on a Spring JPA Application, using MySQL as database. I ensured that all spring-jpa libraries, hibernate and mysql-connector-java is loaded. I'm ru

DetachCriteria paginated query returns duplicate values

I've got a paginated detached criteria execution which return rows of an entity. The entity class is as following. @Entity @Table(name="POS_T_HTL_ITEM_GROUP")

DetachCriteria paginated query returns duplicate values

I've got a paginated detached criteria execution which return rows of an entity. The entity class is as following. @Entity @Table(name="POS_T_HTL_ITEM_GROUP")

Hibernate code generation does not create EJB3 annotation on export

Im trying to reverese engineer Mysql db into pojo java with annotation. this is my configuration : both "Use Java 5 syntax" and "Generate EJB3 annotations" are

Spring MVC request and response flow explanation

I can't find correct client request flow in below syntax.Could someone please clarify what is happening here? Client(1) --> Dispatcher Servlet(2) --> Han

PersistenceException occured : org.hibernate.exception.ConstraintViolationException: could not insert: [models.User]

I have got this exception!! here is my model class @Entity public class User extends Model { @OneToMany(mappedBy="email", cascade=CascadeType.ALL) pub

jpa calling stored procedure with output cursor

I am trying to call an oracle stored procedure that returns an output cursor usign JPA as follows create or replace PROCEDURE stored_proc(ret_cursor OUT sys_

Failed to convert from type [java.lang.Object[]] to type

I have spring web app (JPA/Hibernate + MySQL). I have two DAO classes. CustomerDAO @Entity @Table(name = "customers") public class Customer { @Id @Column

DuplicateMappingException represented by different logical column names

I'm using OneToMany mapping for two classes MasavNew and MasavRow : @Entity @Table(name = "ArgoCHFileHdr") public class MasavNew { @OneToMany(fetch = Fetch

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