Re: OptimisticLockException confusion.

2008-05-14 Thread Craig L Russell
Hi, Usually, inserts/updates/deletes are grouped for efficiency when the transaction is ended. But for your case, you want to force the update to the database while you are still in control. Try EntityManager.flush() and catch the exceptions. Craig On May 14, 2008, at 5:19 PM, fmchale w

OptimisticLockException confusion.

2008-05-14 Thread fmchale
Hi, I am having trouble catching the OptimisticLockException that is being thrown when I have concurrent users trying to update the same entity. Basically I want to be able to do is to send the one user to another page in my app when this exception is thrown, but for some reason my attempts to c

RE: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

2008-05-14 Thread Fay Wang
Here is my finding: The NPE problem is the combination of (1) abstract class, (2) inheritance strategy of TABLE_PER_CLASS, and (3) toMany relationship. When you have (1) and (2), or (1) and (3), or (2) and (3), you will be fine. However, when the three things are put together, the class strateg

Re: InvalidStateException: Attempt to set column "client.version" to two different values

2008-05-14 Thread Adel Kassim
Hi All, I have the same issue under weblogic 10.0(This uses openjpa 0.9.7) Is any one aware of a workaround for this? Best Regards Adel 2008/5/13 John Leach <[EMAIL PROTECTED]>: > > Dear list, > > I must stop talking to myself. Yes it is a bug > https://issues.apache.org/jira/browse/OPENJPA-3

Re: OpenJPA Update Issue with Order

2008-05-14 Thread Craig L Russell
Hi, Two things: the 1.0.0-SNAPSHOT isn't a good release to use; and is it possible for you to post the code that is causing the problem with a more current release (1.0.2 or 1.1.0-SNAPSHOT)? Craig On May 14, 2008, at 2:18 PM, SomuReddy wrote: Hi I am trying to update table using the e

OpenJPA Update Issue with Order

2008-05-14 Thread SomuReddy
Hi I am trying to update table using the executeUpdate() method. Table has the 20 columns, i am tyring to update the all the columns. when i run the program it gives the following exception, And It says "parameters were not given values", but I am specifying the all the values. though each time

Re: Fetch database changes from external sources

2008-05-14 Thread Craig L Russell
Hi, It sounds like you're using the second-level cache which is dutifully returning the current contents that are cached. Have you tried using the evict methods of the second level cache, or disabling it for the application? Craig On May 14, 2008, at 2:37 AM, Alexandros Karypidis wrote:

RE: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

2008-05-14 Thread Fay Wang
I take it back. I found that when I put the fields and methods in EntityBase class directly in the Translatable class instead of having Translatable inherit from EntityBase class, I still get NPE. This problem seems having nothing to do with MappedSuperclass annotation. -Fay --- On Wed, 5/14/

RE: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

2008-05-14 Thread Fay Wang
Hi Mike, Your super class EntityBase is annotated as @MappedSuperclass. Your Translatable class which inherits from EntityBase has inheritance strategy of TABLE_PER_CLASS. Since MappedSuperclass itself is not a persistence class and can not act in the capacity of an entity, it does not have

RE: agent error

2008-05-14 Thread James Sutherland
They are very simple int and String types. Michael Vorburger-4 wrote: > > Well, what is the type of those fields in your JPAIndexedPilot class? > > > -Original Message- > From: James Sutherland [mailto:[EMAIL PROTECTED] > Sent: mardi, 13. mai 2008 21:57 > To: users@openjpa.apache.org

RE: agent error

2008-05-14 Thread Michael Vorburger
Well, what is the type of those fields in your JPAIndexedPilot class? -Original Message- From: James Sutherland [mailto:[EMAIL PROTECTED] Sent: mardi, 13. mai 2008 21:57 To: users@openjpa.apache.org Subject: agent error I'm trying to getting a very simple model working in OpenJPA 1.0.2

Re: Fetch database changes from external sources

2008-05-14 Thread Alexandros Karypidis
I would like to add that I am using OpenJPA in standalone mode. Also, I was thinking about the PersistenceContextType and that it may be EXTENDED (which may be related to my woes), but I can't seem to find a createEntityManager(PersistencContextType type) method in the factory. Is that not pa

RE: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

2008-05-14 Thread Michael Vorburger
https://issues.apache.org/jira/browse/OPENJPA-602 -Original Message- From: Michael Vorburger [mailto:[EMAIL PROTECTED] Sent: mercredi, 30. avril 2008 17:07 To: users@openjpa.apache.org; [EMAIL PROTECTED] Subject: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

Fetch database changes from external sources

2008-05-14 Thread Alexandros Karypidis
Hi, First of all, I've done research through the archives for the situation I am facing and found this: http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/[EMAIL PROTECTED] I am facing the exact problem mentioned in that thread: I need to fetch an object several times from t