Whenever I try to set a list as a parameter for use in an IN expression I get an Illegal argument exception. Various posts on the internet seem to indicate that this is possible, but it's certainly not working for me. I'm using Glassfish V2.1 with…
I add entity to my database and it works fine. But when i retrieve the List, i get the old entity, the new entities i add are not shown until i undeploy the application and redeploy it again. This means are my entities cached by default? But, I…
We are using Toplink implementation of JPA + Spring + EJB. In one of our EJBs we have something like this:
public void updateUser(long userId, String newName){
User u = em.get(User.class, userId);
u.setName(newName);
// no persist is…
I'm using JPA toplink-essential and SQL Server 2008
My goal is to get auto-increment primary key value of the data that is going to be inserted into the table. I know in JDBC, there is getInsertedId() like method that give you the id of…
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 =…
I have a JPA project which used to work. This month, I have added some data in my database. When I run the usual job (I used to run on preceeding months), I get this error:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs…
I'm building a J2SE application with EJB3 and an Oracle Express Edition DB.
My problem is like that - I set an EntityBean in my project which matches a table in the DB. The table contains a column which is not nullable and has a default value. All I…
I'm wondering how to handle optimistic lock version property in entity class using JPA (toplink essentials) from server to client and vice versa.
Here is the scenario.
From browser user send request to the server asking for individual user info to…
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…
I'm using JPA toplink-essential, building REST web app.
I have a servlet that find one entity and delete it.
Below code I thought I could catch optimistic lock exception in servlet level but its not!
Instead RollbackException is thrown, and that's…
I've got an integration test of a DAO in which I use a shared EntityManager (via Spring, using SharedEntityManagerCreator). The test class is marked as @Transactional, as is the DAO method under test.
In both the test class and the DAO I'm…
I have a long-running method which executes a large number of native SQL queries through the EntityManager (TopLink Essentials). Each query takes only milliseconds to run, but there are many thousands of them. This happens within a single EJB…
I'm using Netbeans 6.9.1 and TopLink Essentials for the JPA.
I had followed the necessary steps for JPA connection.
Yet when I execute a named query in a particular entity.
This exception always return to me
NamedQuery of name: [the query name] not…
I experienced an odd behavior with a java desktop application that uses Toplink essentials as persistence provider.
I have a single directory containing all I need for my application: a jar, a lib folder and a JavaDB database. The whole directory is…
HI, I am having a problem. My (i am guessing) persistence layer is caching my results, so when i update the database from outside my application then the data is remaining stale.
however, it is only caching half the time, i hope this makes sense,
I…