Category "hibernate"

org.hibernate.QueryException: Not all named parameters have been set:[]

I'm getting extremely strange behavior out of JPA 2.0 I'm trying to build a query that looks likes, where employeId and empDepartment are long values passing

Error java.lang.AssertionError: expected: null<null> but was: java.lang.String<null> what does it mean?

I have this strange issue in my Junit 4.12 test code. The application uses Spring Framework 4.1.6 and Hibernate 4. When comparing two beans coming from differen

Hibernate Mapping Error: MappingException: An AnnotationConfiguration instance

I have a project with Hibernate.I tried to read the configuration file hibernate.cfg and got this error: Error creando una factoria de session.org.hibernate.M

Spring data repository not found at compile time

I am trying to use Spring data and repositories in a Spring Boot application, but I have an error when compiling the project. Here is my Entity : package fr.i

How to limit result in @Query used in Spring Data Repository

I am retrieving data by CrudRepository in Spring Data JPA. I want to filter my records those are retrieved from my custom query provided in @Query annotation. I

Hibernate mapping classes from hibernate.cfg.xml

For class mapping from hibernate.cfg.xml I use these format below: <mapping class="packageName.className1"/> <mapping class="packageName.className2"

getting Caused by: org.hibernate.QueryException: cannot dereference scalar collection element: roles

I have this class , and i'am trying to acess mobileNumbers and roles from the user table , but being lazy intialized i keep getting 'lazy intialization error. I

What is the "proper" way to cast Hibernate Query.list() to List<Type>?

I'm a newbie with Hibernate, and I'm writing a simple method to return a list of objects matching a specific filter. List<Foo> seemed a natural return typ

Initializing C3P0 connection pool takes 2 min

I can't wrap my head around why the initialization of a c3p0 connection pool takes 2 min in my Hibernate application. This is in my Hibernate.cfg.xml: <hib

When does the hibernate session gets closed

I have created the following entities. @Entity public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;

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