0
votes
0answers
9 views

Why is there a class with entity name plus an underscore for JPA entity class

I am new to JPA, I have created a class like the following /** * */ package programme; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Entity; ...
0
votes
0answers
5 views

orphanRemoval does not work as expected in Hibernate

Based on my previous question and using the same Entities I am trying to delete from the database an Employee. As far as I am concerned the easy way in this case is to use "orphanRemoval=true" and ...
1
vote
1answer
12 views

How to wrapper Hibernate session API avoid of “unchecked” generics warning

I'm coding a wrapper for Hibernate Session API: @SuppressWarnings("unchecked") public <T> List<T> execQuery(String hql){ Session s=sf.getCurrentSession(); return ...
0
votes
0answers
10 views

Null Pointer when getting object from h:selectOneMenu

I am trying to get Object "Plage" from h:selectOneMenu ,That's why I created a Converter ,it convert String id to Plage object existing in database using dao (hibernate ) Here my xhtml code : ...
0
votes
1answer
16 views

How could I change java.lang.Enum's ordinal when using JPA and Spring?

The Entity: @Entity @Table(name = "table_name") public class MyClass extends IdEntity { private MyEnumType enumType; @Enumerated(EnumType.ORDINAL) public MyEnumType getEnumType() { ...
0
votes
0answers
5 views

Error when saving @Lob with hibernate java mysql

Technology: hibernate 4.3.4.Final spring-data-jpa 1.5.0.RELEASE mysql-connector-java 5.1.30 c3p0 0.9.5-pre8 Some part of dao context: <bean id="dataSource" destroy-method="close" ...
0
votes
2answers
13 views

OneToMany association colection is null in Hibernate application

I am developing a simple Hibernate application to test an OneToMany association. The Entities I use are Employee and Department which has many Employees: @Entity public class Department { @Id ...
0
votes
2answers
15 views

HQL query for retrive rows from ManyToMany Join Table

I'm working on website where user can subscribe to Organisation. when I'm going to implement Subscribe function and I face the following problem. In sort I want to create model class of ManyToMany ...
0
votes
1answer
20 views

Getting exception as I try use the WHERE clause

While trying to execute the query with where clause, I get an exception : SEVERE: Unknown column 'suhail03' in 'where clause' org.hibernate.exception.SQLGrammarException: could not execute query ...
0
votes
0answers
4 views

how to auto-wire HibernateBundle with guice on dropwizard?

Im trying to configure hibernatebundle with guice/dropwizard and need help. Im using hubspot / dropwizard-guice / 0.7.0 3rd party library in addition to dropwizard lib. The code below obviously wont ...
0
votes
1answer
25 views

How to make a java seach & editable combo box

I created a combo box and it load items from another class.Now I want to make that,when I type a letter in the combo box,whole Items relating to that letter should be selected and list down.Can ...
0
votes
1answer
33 views

Still getting PersistenceException: No Persistence provider for EntityManager

I get such an exception after deploying my application: Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named JavaAcademyUnit at ...
-2
votes
0answers
13 views

How To Perform Reverse Engineering In Spring Tool Suite?

How to perform reverse engineering in spring tool suite-3.4 IDE I have googled alot but the result was negative. we are using hibernate with JPA -4.3 implementation with complete annotations... even ...
0
votes
1answer
24 views

How do you initialize a Lazily loaded collection in Hibernate?

I'm fairly confused as to how to structure my code when Hibernate is Lazy loading everything. As I have it now, I get the Could not initialize proxy - no session exception when I try to load some ...
0
votes
2answers
23 views

Layer to use the @Transactional annotation in Spring Data JPA

I am using Spring data JPA for my application.I have the following layers : 1.Service layers with Interfaces and Impls (annotated @service) 2.CRUD repository layer wih Spring data JPA,I also have ...
0
votes
1answer
27 views

Hibernate + Spring: javax.persistence.TransactionRequiredException: no transaction is in progress

I'm currently setting up a project with Spring and Hibernate. After several other problems i got the next problem :P Anyway. When call entityManager.flush() I get an exception: ...
0
votes
1answer
19 views

org.hibernate.HibernateException: No Session found for current thread 5

I know this problem is asked a lot but I am stuck. I am basing my project off of this tutorial: http://www.cavalr.com/blog/Spring_3_and_Annotation_Based_Hibernate_4_Example This is my ...
0
votes
0answers
21 views

After upgrade spring version got Error configuring application listener

I need upgrade my spring version couse I want use hibernate 4. But when I upgrade spring from 3.0.5RELEASE to 3.2.6RELEASE i got this error: SEVERE: Error configuring application listener of class ...
0
votes
1answer
16 views

Hibernate: Unable to load class declared in Hibernate configuration <mapping/> entry

I am completely new in Hibernate and got such an stacktrace: hql> from TracksEntity [2014-04-26 21:13:45] org.hibernate.MappingException: Unable to load class [ model.TracksEntity] declared in ...
0
votes
1answer
18 views

Load Collection with entityManager

I got a beer @Entity @Table(name="beer") public class Beer implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long id; ...
0
votes
2answers
39 views

Hibernate & Spring: EntityManager is Null

I'm setting up a Project with Spring and Hibernate. I created an abstract DAO class that contains an EntityManager. When I want to use this EntityManager, it's null and I dont understand why. Maybe ...
0
votes
1answer
15 views

JPA and Hibernate initialize Non Lazy Collections Error

In my JavaFX application When I use Non Lazy Collection option with EmbeddedId class, for maintain bidirectional relation ship it will produce following exception. After working on several hours yet I ...
0
votes
0answers
9 views

trigger or annotation JPA ?updating value of property

how can I use the annotation so that when I changed the Tasktime ( entity task property) TASK (entity) will affect its ProjectTime (project entity property) project (entity) this is my class project ...
0
votes
1answer
15 views

Java hibernate: Update foreign key in manytoone relationship automatically

I have a problem with the auto update of foreign keys which appears as following: I have a two tables HamKeyword and HamKeywordAlias. One entry in the hamKeyword has 0…n entries in HamKeywordAlias. ...
0
votes
1answer
22 views

spring mvc with hibernate query.getResultList() won't print in the jsp file

hibernate generated the following query : Hibernate: insert into RegForm (description, name, pic) values (?, ?, ?) Hibernate: select regform0_.id ...
2
votes
2answers
42 views

Java generics ? extends Clazz

I'm using spring, hibernate and junit to setup a test class for some of my models. All of my models extend BaseModel I have the following function in my testing class: void ...
0
votes
2answers
33 views

Transactional annotation doesn't work

I use spring 3.2.8, hibernate 4. I have an error "org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.HibernateException: createCriteria ...
0
votes
0answers
36 views

Java Spring: Error creating bean

I have a spring project added to Eclipse. When I run project on server from eclipse, I get these errors: Error creating bean with name 'sessionFactory' defined in ServletContext resource ...
0
votes
3answers
21 views

Which java datatype to use in a hibernate entity to represent id colum in a database

I am designing a database for a web application. I am using Hibernate ORM framework to persist data to the database. I was wondering which java data type should i use to represent the id columns? in ...
0
votes
0answers
8 views

How to use SchemaExportTool with JPA and Hibernate 4.3

At Hibernate 4.3 Ejb3Configuration class was removed. This class was commonly used for creating hibernate configuration file from a persistence unit (persistence.xml file) to SchemaExport tool. As a ...
0
votes
0answers
6 views

hibernate-commons-annotations-4.0.1.Final.jar; invalid LOC header (bad signature)?

I am new for Maven ..I am trying to create maven project for springMVC+Hiberante but I am getting lot of errors..can any one slove my problem please check my pom.xml for below <?xml version="1.0" ...
0
votes
2answers
28 views

SessionFactory gives me java.lang.NullPointerException

I use spring 3.2.8, hibernate 4. I have an error "HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException" exception ...
1
vote
0answers
29 views

JPA One-to-One Integrity Constraint violation

I have the following entities: @Entity @Table(name = "parent") public class Parent { @Id private String id; @OneToOne(mappedBy = "parent") private Child child; //getters, ...
-1
votes
1answer
30 views

getting class cast exception while storing the content of list into set

I have fired the below hibernate query which is fetching the data perfectly but the return type is of List as shown below.. public List<Object[]> Extractingc() { Criteria criteria ...
0
votes
1answer
14 views

hibernate many-to-many relationship updating unexpectingly

I have two classes: class TrainingCourse { Integer id; @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER) @JoinTable(name = "TrainingCourseClass", joinColumns = { ...
0
votes
0answers
6 views

Error thrown in preDeregister method at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preDeregisterInvoke

EVERE: Error unregistering mbean javax.management.RuntimeErrorException: Error thrown in preDeregister method at ...
0
votes
1answer
25 views

Spring 3 MVC + Hibernate 3.5.x : Autowiring and Dependency Injection of SessionFactory

I am new to Spring framework; need some clarifications on how the SessionFactory object Dependency injection is working in below code. spring-servlet.xml <context:annotation-config /> ...
-2
votes
0answers
13 views

Mahout Recommender with Apache Lucene and Hibernate Search [on hold]

I am trying to create a recommender system using the following: JSF, Mahout, Mongo DB, Hibernate Search and Apache Lucene? I have used JSF to create the interface. The mahout recommender generates ...
1
vote
0answers
28 views

Did Spring 4.03 vs 3.2.6 change how @Transactional works for Services

We've run in to an issue when upgrading to Spring 4 from 3. We've done some testing, but haven't come to a definitive conclusion yet. Basically what we're seeing is that our code which looks something ...
0
votes
1answer
17 views

After adding @Future annotation to entity - TraversableResolver.isReachable() threw an exception

I am using Spring Framework 4 & Hibernate 4. I added @Future constraint into my entity and after that I am running into Exception: javax.validation.ValidationException: HV000041: Call to ...
1
vote
2answers
43 views

How to programmatically get a reference to an enum in Java?

I'm using Java 1.6 and Hibernate 3.6.10.Final. I need to check the contents of several database tables against enums built into our application. (The database tables tend to get values added and ...
0
votes
1answer
11 views

hibernate Inheritance caching, incorrect entity names used in CacheKey?

I have an application (spring/hibernate/ehcache 4.3.5 final) where second level cache is working for the majority of objects. But it seems to be broken at a TABLE_PER_CLASS inheritance model, there ...
0
votes
1answer
27 views

Hibernate Unresponsive with Spring-WS

I have a single-context Spring-WS application (that is, there is only one file in my project that contains definitions), something-servlet.xml. When I call persist through my DAOs, no entries are ...
-2
votes
1answer
19 views

HibernateUtil class and org.hibernate.MappingException: duplicate import [on hold]

I'm having the same problem that is posted below ...
0
votes
1answer
28 views

Java Hibernate field access property or property based access

i am developing some improvements over a legacy system have some quite time i have a class like this class MyPersistentClazz { private String aTPlace; public void ...
0
votes
1answer
45 views

Purpose of having custom annotations

Some projects using of custom annotations as below. For example as below. Please explain me when should I take decision to have custom annotations. Role of @Target & @Retention annotation ...
0
votes
1answer
10 views

Dialect class not found. \when using hibernate

This is my code. When i execute at a time it gives below error. Initial SessionFactory creation failed.org.hibernate.HibernateException: Dialect class not found: ...
0
votes
1answer
16 views

hibernate reverse engineering column missing not null attribute

I am using hibernate reverse engineering to retrieve entities from DB (in this case oracle DB). I found in some cases constraints not-null is missing in generated hbm files. And it depends how ...
0
votes
0answers
25 views

how to use hibernate currentSession() with spring 4?

Hi i am using spring 4 along hibernate 4 , Actually i also configured OpenSessionInViewFilter for ui pages rendering perpose here is my configuration file <?xml version="1.0" ...
0
votes
1answer
37 views

Hibernate : limit rows in a table

I am using hibernate. I have table like this : Table backup (ID, TIMESTAMP, DATA) This table should have 20 rows max at any time. So when inserting row in this table. I should always check no of ...