jpa

Unable to locate Spring NamespaceHandler for XML schema namespace

I'm getting the following error when I try to run a simple app (JPA + Hibernate + Maven). It works fine when I deploy a war file into an app server but it doesn't work from my IDE (Eclipse). Is it possible to run it without app server? If yes, what is a problem? Exception in thread "main" org.springframework.beans.factory.parsing.BeanDe...

How to Java Persistence Api with MS Access ?

I could not find any jdbc driver for ms access.So how can I connect MS Access with JPA ? ...

Creating field with reserved word name with JPA.

@Column(name="open") Using sqlserver dialect with hibernate. [SchemaUpdate] Unsuccessful: create table auth_session (id numeric(19,0) identity not null, active tinyint null, creation_date datetime not null, last_modified datetime not null, maxidle int null, maxlive int null, open tinyint null, sessionid varchar(255) not null, user_id ...

JPA : optimize EJB-QL query involving large many-to-many join table

Hi all. I'm using Hibernate Entity Manager 3.4.0.GA with Spring 2.5.6 and MySql 5.1. I have a use case where an entity called Artifact has a reflexive many-to-many relation with itself, and the join table is quite large (1 million lines). As a result, the HQL query performed by one of the methods in my DAO takes a long time. Any advice o...

Why does the Google App Engine documentation emphasize JDO over JPA?

Most of the docs for Google App Engine are written for JDO. Only one page of docs are devoted to using JPA. Is this because JDO is more suited to App Engine or was there some other reason for the preferential treatment given to JDO? ...

JPA PreUpdate implemented using DescriptorEventAdapter called after find/select

I have implemented a DescriptorEventAdapter for JPA (eclipselink). It performs simple timestamp operations. The preUpdate method is being called, however it is being called too often. It gets called and updates the timestamp, even on find/select operations. The issue I'm running into appears to occur in a different JPA framework also, h...

Hibernate Mapping Through Another Entity

Consider this simple database schema: User Course StudentCourse Student +-------------+ +-------------+ +-------------+ +-------------+ | -user_id |1 *| -course_id |1 *| -course_id |* 1| -student_id | | |---->| -user_id |---->| -student_id |---->| | +--...

How to write select queries for paginating output from ManyToMany attributes

I have a Group table with ManyToMany relationship with the User table via a join table. A Group could contain a lot of users or could contain sub groups containing more users. I am using JPA, Hibernate 3.3 How do I paginate the results returned by Group.getUsers() which could be either users obtained via Group.getUsers OR could be all...

Approach for a (generic) DDD Repository with JPA/Spring: does it look wrong?

I'm pretty new to DDD and JPA. I'm working on a generic Repository with JPA and Spring. I really like the approaches exposed in the articles DDD: The Generic Repository and JPA implementation patterns: Data Access Objects. My aim is to build the perfect Repository in Domain-Driven Design with JPA and Spring. I use an internal generic R...

how to receive data from different datasources and transmit them through JMS

The project is required to receive lot of data(the possible historical weather data of one State) from different datasources, like zip files, data files within a website. The data format is not clear, the files might be txt, pdf, or .xml. Since it specifies that JMS and JPA should be used for implementation, I am thinking use JMS Object...

Does @AttributeOverride annotation breaks polymorphism?

Hi, I need help with inheritance in JPA I will illustrate my problem with an example: Supose we have an Animal class and a Cat class. @Entity @Table(name = "animal") @DiscriminatorColumn(name="animal_type",columnDefinition="Integer",length=11) public class Animal implements Serializable{ @Id @GeneratedValue (strategy = Generat...

google App engine datastore via JPA and JDO

what are jar files needed for google App engine datastore via JPA and JDO ...

Class "model.Address" is listed in the persistence.xml file but not mapped

I create one JPA project .In that it display the following error .How to slove this error? ERROR MESSAGE: Class "model.Address" is listed in the persistence.xml file but not mapped How to map class file in persistance.xml? /****code for Address *******/ package model; import java.io.Serializable; import javax.persistence.*; /** ...

jar file for JPA 2.0

import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; I've created a JPA project where I try to user the above classes but I'm unable to find what jar I'm missing for them. Please guide me. ...

Am I supposed to call EntityManager.clear() often to avoid memory leaks?

I'm new to JPA/OpenJPA and I noticed that if I don't call EntityManager.clear() after i persist entities I get an OutOfMemoryError (I keep adding new entities in a loop). I'm not sure if this is the expected behavior or it's just and OpenJPA 1.2.1 glitch. So, am I required to explicitly detach the entities myself? If I'm not, it's a go...

JPA/Hibernate, @Embedded and Enum

Hi, I'm trying to persist an Enum as an Embedded value (ideally using it's String representation, but even ordinal would be ok right now) The Enum: @Embeddable public enum DayOfTheWeek { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY; public int toCalendar() throws EnumConstantNotPresentException{ switch (this) { ...

How to remap a JPA entity or defer mapping to a later point

We have common modules (for configuration, security, notifications, etc.) that define the entities and the logic for the module as a reusable JAR. The only imposed dependency is the name of the table that the JPA entities map to (we use JPA annotations were possible, Hibernate annotations were JPA doesn't define one). Is there a way to...

How to create JPA application in eclipse

How to create a JPA application using Google's datastore in Eclipse? What are the steps to create a Google App Engine application in Eclipse? ...

Difference between JPA and JDO?

want to develop my project on Google App Engine .I want to use google big table as database. For the database I have two options JPA and JDO. Will you guys please suggest me on it? Both are new for me and I need to learn them. So I will be focused on one after your replies. ...

Google App Engine datastore

I created employee details application in eclipse. I want to store employee details in google Bigtable. so that i used JPA. I created one jpa project in eclipse.In that i want to use google datastore[Bigtable] as database. After created application its enough to run directly.are need to give any database connection. ...