aspose file tools*
The moose likes JDBC and the fly likes Browser history and delete cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Browser history and delete cache" Watch "Browser history and delete cache" New topic
Author

Browser history and delete cache

naga eswar
Ranch Hand

Joined: Jan 25, 2012
Posts: 120
Hi to all,

We are using html,jsp,xml, servlets and beans in our application and DB2 as backend.
The issue is in Leave application(maintains Leaves of Employees) which is the part of HRMS.

We are facing below error at production level. Once we clean the browser history and delete cache then its working working fine. Can any body tell some permanent solution.


Status of objects submitted.. Error encountered while trying to execute the query INSERT INTO LAT_ATT(EMPID,ATTDATE,ATTTYPE,ATTMARKEDBY)VALUES(‘15895’,’04-03-2013’,’PR’,’15895’). Actual error message is One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "DB2INS1. LAT_ATT " from having duplicate rows for those columns. Error encountered while trying to execute the query INSERT INTO LAT_ATT(EMPID,ATTDATE,ATTTYPE,ATTMARKEDBY)VALUES(‘15895’,’04-03-2013’,’PR’,’15895’) Actual error message is One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1 " constrains table "DB2INS1. LAT_ATT " from having duplicate rows for those columns. For error during submission for any objects check error log for details of errors.
naga eswar
Ranch Hand

Joined: Jan 25, 2012
Posts: 120
Hi all,

We are using below code in order to prevent from caching in jsp file using filters



This working fine upto IE8. But its working in IE9.

Can anybody please help me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18168
    
    8

I don't see what JSP caching has to do with the question. You should look at your code and find out why it is trying to insert a record without first checking for duplicate keys.
naga eswar
Ranch Hand

Joined: Jan 25, 2012
Posts: 120
Thanks for your paul,

I can put a check for duplicate keys.
If I done so, what will happen to the original record that is to be insert into table.

For example, Record2 has to be insert and record1 is already in the table and in the cache.
While we are trying to insert Record2, then the record1 in the cache also try to insert and we are getting error.

My doubt is that, how can I eliminate the record1 after checking duplicate keys. We are inserting the data through beans. Is the record1 data is also inserting through beans.

Sorry if I confused with my half knowledge. Please help me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18168
    
    8

naga eswar wrote:While we are trying to insert Record2, then the record1 in the cache also try to insert and we are getting error.


I see. Then this is a bug and you should try to find out why Record1 is being submitted instead of Record2.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Browser history and delete cache
 
Similar Threads
Error Help
Need help with DuplicateKeyException
IBM 287 questions to Howard
Synchronizing issue
one question in ICE 287