atg droplet - SQL Statement Failed in ATG -
i working in atg application. today, got below sql exception in /atg/userprofiling/profileadapterrepository , because of violation of unique constraint.
atg.repository.repositoryexception; source:java.sql.sqlintegrityconstraintviolationexception: ora-00001: unique constraint (dcs_usr_actvprom_p) violated
exception occurs when insert query user promotion table dcs_usr_actvpromo of atg executed. searched when , query executed, values passed not find till now.
handlelogin method of atg.scenario.userprofiling.scenarioprofileformhandler have been called custom formhandler. not find flow after method call. after method call, exception occurs.
could let me know happens inside method , sql queries executed in atg above table please?
you did not add actual sql trying run, error message pretty says all. breaching unique
constraint.
let's suppose have table called foo
, have unique
column, called bar
. if intend insert record foo
, having bar
value of 'loremipsum'
, statement not successful if foo
table has record bar
has value of 'loremipsum'
.
as result, insert
of:
insert foo(bar) values('loremipsum');
has risk of failing. prevent risk of happening, have check whether value exists, this:
insert foo(bar) select 'loremipsum' foo 'loremipsum' not in (select distinct bar foo)
Comments
Post a Comment