toplink

EJB-QL query never returning unless another query is run

I have a strange strange problem. When executing the following EJB-QL query, my ENTIRE application will stop responding to requests, as the query never finishes executing. Query q = em.createQuery("SELECT o from RoomReservation as o WHERE o.deleted = FALSE AND o.room.id IN (Select r.id from Room as r where r.deleted = FALSE AND r.typ...

How to use Enum as NamedQuery parameters in JPA

I have an Entity with a enum attribute and a couple on NamedQueries. One of these NamedQueries has the enum attribute as a parameter i.e. SELECT m FROM Message m WHERE m.status = :status When i try to ru n the query i get the following error; Caused by: java.lang.IllegalArgumentException: You have attempted to set a value of type clas...

Is JPA expertise transferable to Toplink?

How similar are JPA and Toplink such that expertise in one could carry over to the other? ...

JPA inserts slow with an object graph

I'm trying to do a cascading save on a large object graph using JPA. For example (my object graph is a little bigger but close enough): @Entity @Table(name="a") public class A { private long id; @OneToMany(cascade = CascadeType.ALL, mappedBy = "a") private Collection<B> bs; } @Entity @Table(name="b") public class B { private lo...

GlassFish 2.1.1 - TopLink (JPA1) Persistence Exception 7106 - String Encryption Mistery...

I'm using NetBeans 6.8 and Glassfish Enterprise Server 2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs). I created a servlet and used Netbeans code generation features to imlement persistence using TopLink (JPA1). When I try to create an Entity Manager with the following code: EntityManagerFactory entityManagerFactory=Persiste...

TopLink 11g versus EclipseLink

We're considering migrating to TopLink 11g JPA from Oracle Kodo JDO. But I see that EclipseLink exists and appears to be, perhaps, better thank Toplink. The wiki article on it currently states EclipseLink is based on the TopLink product, which Oracle contributed the source code from to create the EclipseLink project. The origin...

Embeddable databases and toplink

I'm trying to get toplink and jsqlite to work. But I get a similar error like this thread: http://stackoverflow.com/questions/906241/jpasqlite-problem Exception Description: SEQ_GEN_SEQUENCE: platform DatabasePlatform doesn't support NativeSequence. I'm not sure it jsqlite even works with toplink, since I couldn't find a description s...

not able to load entity after insertion in toplink

hi, i am using toplink as ORM tool, i am facing one peculiar problem. I am inserting an entity into the session and then in the next line if i try to load the same entity, i am unable to get that, instead it returns me null. But the same issue if i try using hibernate, then it works properly. can any one please help. Address address = n...

Autonomous transaction in TopLink

Hi, I am facing a problem, I want to implement autonomous transaction in TopLink, but I am not too sure about if it is possible or not. I have a also worked on hibernate, as we have stateless session there... do we have something same in TopLink... Please help. ...

Error While acquiring Client session in TopLink

Hi, I am facing a peculiar issue. Below is the stack trace of what error i am getting.Please help. Exception [TOPLINK-7001] (Oracle TopLink - 11g Release 1 (11.1.1.1.0) (Build 090527)): oracle.toplink.exceptions.ValidationException Exception Description: You must login to the ServerSession before acquiring ClientSessions. at oracle.to...

JPA with Multiple Servers

I am currently working on a project that uses JPA (Toplink, currently) for its persistence. Currently, we are running a single application server, but, for redundancy, we would like to add a load balancer and another application sever (and possibly more as it grows). First, I'm running into the issue of JPA caching. Since two processes ...

Toplink Validation with Ant fails due to SessionLoaderExceptions

Hi, I'm trying to integrate toplink's session exports with my build process (Apache Ant). I've been working from the example here: http://download.oracle.com/docs/cd/E14571_01/web.1111/b32441/mw.htm My Ant init target and the session validation target are shown below: <!-- ============ init Target ============== --> <target name="init...

JPA/toplink heterogeneous list of entities

Colleagues, Using JPA I need resolve following issue: at database level exits 3 entities (saying SuperEntity, DetailsAEntity and DetailsBEntity). SuperEntity contains common part of fields for DetailsAEntity and DetailsBEntity. So the question: is it possible to resolve collection of mixed elements DetailsAEntity and DetailsBEntity from...

Typesafe queries for TopLink

Is there any other way to do typesafe queries with TopLink than through the JPA 2.0 Criteria API? From a sales meeting I got the impression that this is possible through a proprietary part in TopLink, but I couldn't find any related documentation. ...

JPA XML Query File

Hi! I would like to include all named queries in a separate XML file and use it in persistence. How can I accomplish the same? I am using Toplink JPA in a JSF-Web application. Actually I am not able to get the directory/file structure to use. I tried to use in persistence.xml and tried to place the query file in several locations. Eve...

Any tools for testing ad hoc JPQL queries outside of an application?

I'm working on a project which uses JPA for persistence, and I'm trying to find the cleanest and most efficient means for testing JPQL queries. I am more accustomed to the Hibernate world... in which you can test HQL on an ad hoc basis outside the application, using Hibernate Tools and its Hibernate Console. I believe that tool also su...