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 
(DBUSER.USER_INFO_PK) violated

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 
log:
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.

Alex



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


Mime
View raw message