Hi,
I am peristing data into single table in oracle.. I am not using sequence at all. I am using hibernate increment in hbm file.
Code:
public class TestLwot {
public static void main(String[] args) {
MakeLwotObj makeLwotObj= new MakeLwotObj ();
LWOTDao lwotDao = new LWOTDaoImpl();
lwotDao.persistLWOTPatient(makeLwotObj.getLwot()); // IT CALLS SAVE OR UPDATE OF HIBERNATE
// makeLwotObj.getLwot() returns LwotObject.. which does not contain any id.. id field is null..
try {
Thread.sleep(30 * 1000);
lwotDao.persistLWOTPatient(makeLwotObj.getLwot()); // IT CALLS SAVE OR UPDATE OF HIBERNA
TE
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
I am trying to run the SAVEORUPDATE using 2 jvm's then its failing with en exception stating that
Code:
Code:
ORA-00001: unique constraint (DATEAM.SYS_C0039965) violated
Does any body has any ideas why it is doing that
You get this problem when u run this code from different system's or through Different JVM's.
Thanks
Kasinath