Questions tagged [toplink-essentials]

The Java Persistence API Implementation at GlassFish

For more info, see the official TopLink site

46 questions
28
votes
9 answers

Setting a parameter as a list for an IN expression

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…
perilandmishap
  • 2,453
  • 2
  • 20
  • 27
19
votes
5 answers

Are entities cached in jpa by default?

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…
TCM
  • 16,242
  • 43
  • 150
  • 245
13
votes
1 answer

JPA - saving changes without persist() invoked

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…
anthony
  • 233
  • 2
  • 10
7
votes
3 answers

Why JPA persist() does not generated auto-increment primary ID?

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…
Meow
  • 16,125
  • 50
  • 122
  • 176
5
votes
3 answers

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 =…
user364939
  • 223
  • 1
  • 10
5
votes
1 answer

(JPA/Toplink) Network error IOException: Address already in use: connect

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…
Jean N.T.
  • 73
  • 1
  • 5
5
votes
4 answers

EJB3 - @Column(insertable="false") question

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…
WhiteTigerK
  • 51
  • 1
  • 2
4
votes
2 answers

Error While acquiring Client session in TopLink

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…
M.J.
  • 14,866
  • 25
  • 70
  • 95
3
votes
3 answers

How to catch OptimisticLockException in servlet level?

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…
Meow
  • 16,125
  • 50
  • 122
  • 176
3
votes
1 answer

JPA optimistic lock version handling - version value should be carried onto client side or?

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…
Meow
  • 16,125
  • 50
  • 122
  • 176
3
votes
2 answers

JPA: Does EntityManager.find() always return the same object reference for the same key?

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…
Conan
  • 1,971
  • 22
  • 38
2
votes
3 answers

How to reestablish a JDBC connection after a timeout?

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…
Dmitry Chornyi
  • 1,711
  • 4
  • 22
  • 32
2
votes
6 answers

Toplink bug. Empty result for valid sql with not empty result

How is it possible? We are executing EJBQL on Toplink(DB is Oracle) and query.getResultList is empty. But! When i switched log level to FINE and received Sql query, that TopLink generates, i tried to execute this query on database and (miracle!) i…
Sergey Vedernikov
  • 7,163
  • 2
  • 23
  • 27
2
votes
1 answer

JPA: NamedQuery of name: not found

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…
Cyril Horad
  • 1,525
  • 3
  • 22
  • 35
2
votes
1 answer

PersistenceException with Umlaut in path

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…
Matt Handy
  • 29,195
  • 2
  • 84
  • 106
1
2 3 4