This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Browser history and delete cache

 
naga eswar
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20184
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20184
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic