db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chen <alex_c...@sbcglobal.net>
Subject unique constraint violation
Date Wed, 08 Mar 2006 19:24:36 GMT
I have seem the following exceptions in my application:

java.sql.SQLException: ORA-00001: unique constraint 

It seems that the same primary key has been used again by the ID broker.

When we use Torque to 'save' the object, the ID broker automatically 
allocates the primary key for that object, right?
I do not know what kind of scenario can cause the exception?

When this happens, does ID broker try to reuse the same ID for the next 
insertion?  If so, wouldn't that make the exception happen indefinitely?

Another questions is that I also see the following warning message in my 
WARN  [main] IDBroker - IDBroker is being used with db 'payroll', which 
does not support transactions. IDBroker attempts to use transactions to 
limit the possibility of duplicate key generation.  Without 
transactions, duplicate key generation is possible if multiple JVMs are 
used or other means are used to write to the database.

This may be something that causes the problem.  How do I let IDBroker 
know that my DB server support 'transaction'?
 I am using Oracle and definitely it support transaction.

Any help is appreciated.


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message