• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browser history and delete cache

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic