I have a java web app that pulls data from an oracle database, and the other day I modified some rows of data using oracle sql developer.
Now the problem is Java keeps returning the old data as if it never changed, but if I run the exact same query in sql developer it returns the current (modified) data.
I don't have any caching enabled, I checked with OracleDataSource.getImplicitCachingEnabled() and OracleDataSource.getExplicitCachingEnabled() and both are false.
Is there some kind of cache built into Oracle itself that needs to be cleared ? I have been racking my brain over this for 2 days.
I tried starting/stopping and undeploying/redeploying the app with no change. I even tried restarting tomcat itself and that hasn't helped. Any suggestions ?
Copyright Notice:Content Author:「user1602187」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15422959/java-returning-stale-data-from-oracle