KM Cache in Cache Monitor is not cleared using KM API

Hi All,
I am trying to clear the KM cache that is pre-configured in Cache Monitor using KM API. Below is the code I am using to clear the cache. It is not clearing the cache but creating the new cache with the name "KM_Cache1 (1)" and default properties set to peak load as 100%. But my requirement is to access the pre-configured cache and clear it then refresh it.
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.service.cache.CacheServiceFactory;
import com.sapportals.wcm.util.cache.CacheException;
import com.sapportals.wcm.util.cache.ICache;
import com.sapportals.wcm.util.cache.CacheFactory;
          Cache cache1 = CacheServiceFactory.getInstance().getCache("KM_Cache1");
Thanks in advance to help me on how to clear the cache in cache Monitor.

The code is as follows:
IIndexService indexService = null;
try {
   indexService = (IIndexService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
} catch (ResourceException e) {
   if (indexService == null) {
     log.errorT("Error on instanciating the index service");
     return this.renderMessage(this.getBundleString(RES_NO_INDEX_SERVICE), StatusType.ERROR);
// get index
IIndex index = null;
try {
   index = indexService.getIndex("YourIndexID");
} catch (WcmException e1) {
   log.errorT("Error when trying to get the index");
   return this.renderMessage(this.getBundleString(RES_NO_INDEX), StatusType.ERROR);
// check if the index is a instance of AbstractClassificationIndex
AbstractClassificationIndex classiIndex = null;
if (index instanceof AbstractClassificationIndex) {
   classiIndex = (AbstractClassificationIndex) index;
} else {
   log.errorT("The index " + index.getIndexName() + " is no classification index");
   return this.renderMessage(this.getBundleString(RES_NO_CLASSIFICATION_INDEX), StatusType.WARNING);
//give your KM Resource here for which you want to know if it is classified or not
boolean classified = classiIndex.isDocClassifiedInAnyTax(resource);
Praveen Gudapati

Similar Messages

  • Cache, cookies and history are not clearing when I close Firefox even though they are set to do so and have been for ages

    I recently had an update (or upgrade?) for FF 16. Today (and I believe the update was done a day or two ago?) my cache, cookies and history are not clearing when I close FF. Also, certain links are not working. Not links for full web pages but for site pop-ups (like the smilie window on a message board). They worked a few days but are not working today. I click the link and nothing happens. I noticed the problem with the cookies not clearing for a few weeks ago but it was only on one site not all sites which is what's happening now.
    My apologies if that's a little confusing. Thanks!

    At any rate, have you tried running Firefox in Private Browsing mode? This will ensure that no infromation from your session is saved once you exit Private Browsing mode and/or exit Firefox.
    You can set Firefox to always start in Private Browsing mode:

  • HT1379 The USB ports on my 30" Cinema are not working.  The monitor has not been used for a year or so, and the computer is a Mac Book Pro, 1012 model running OS Mavericks.  I need to move the computer between two locations, and the other monitor is a 27"

    The USB ports on my 30" Cinema HD display appear to not work.  The monitor has not been used for almost a year, when I upgraded to a new Mac Book Pro and the 27" retina display.  Now I need to move the computer back and forth between two locations using the two displays.  The need for operating USB ports is essential.  Any ideas.  The display appears entirely normal.  Am running OS X 10.9.

    Disregard, problem solved.

  • Best practice to monitor 10gR3 OSB performance using JMX API?

    Hi guys,
    I need some advice on the best practice to monitor 10gR3 OSB performance using JMX API.
    Jus to show I have done my home work, I managed to get the JMX sample code from
    The following is the list of options I am think about:
    * Set up: I have a cluster of one 1 admin server with 2 managed servers, which managed server runs an instance of OSB
    * What I try to achieve:
    - use JMX API to collect OSB stats data periodically as in sample code above then save data as a record to a
         database table
    1. Simplest approach: Run the modified version of JMX sample on the Admin Server to save stats data to database
    regularly. I can't see problems with this one ...
    2. Use WLI to schedule the Task of collecting stats data regularly. May be overkill if option 1 above is good for production
    3. Deploy a simple web app on Admin Server, say a simple servlet that displays a simple page to start/stop and configure
    data collection interval for the timer
    What approach would you experts recommend?
    BTW, the caveats os using JMX in
         Oracle strongly discourages using this API in a concurrent manner with more than one thread or process. This is because a reset performed in
         one thread or process is not visible to another threads or processes. This caveat also applies to resets performed from the Monitoring Dashboard of
         the Oracle Service Bus Console, as such resets are not visible to this API.
    Under what scenario would I be breaking this rule? I am a little worried about its statement
         discourages using this API in a concurrent manner with more than one thread or process
    Thanks in advance,

    Hi Manoj,
    Thanks for getting back. I am afraid configuring aggregation interval from Dashboard doesn't solve problem as I need to collect stats data of endpoint URI or in hourly or daily basis, then output to CSV files so line graphs can be drawn for chosen applications.
    Just for those who may be interested. It's not possible to use SQL to query database tables to extract OSB stats for a specified time period, say 9am - 5pm. I raised a support case already and the response I got back is 'No'.
    That means using JMX API will be the way to go :)
    Has anyone actually done this kind of OSB stats report and care to give some pointers?
    I am thinking of using 7 or 1 days as the aggregation interval set in Dashboard of OSB admin console then collects stats data using JMX(as described in previous link) hourly using WebLogic Server JMX Timer Service as described in instead of Java's Timer class.
    Not sure if this is the best practice.

  • Accounting Document not Cleared using BAPI_ACC_DOCUMENT_POST

    Dear Experts,
    I am Using BAPI_ACC_DOCUMENT_POST to post the GL'S , Accounting document is getting created successfully . My Doubt is whether this bapi will clear the Accounting document automatically or we have to use any other function module to clear the Document?
    Please let me know how to clear the document.
    Thanks & Regards,
    Hemant Gulati(A1)

    Documents are not cleared; their line items are.

  • External monitor will not sleep using 2012 MacBook Air and HDMI adapter

    I am running a HP 27xi (27" display) using the apple thunderbolt to HDMI adapter, and using a HDMI cable.
    I run my 2012 macbook air in "clamshell mode", and solely use the 27" display, which works great. Problem, is when the macbook goes to put the display to sleep, or sleep for the laptop, the display starts to go into power save mode, then flips back on... goes back into power save mode, repeats forever. I called HP, and they said the HDMI signal is not being turned off, hence why the screen keeps going ON, then power save, then repeat. If I shutdown the laptop, then the monitor goes off just fine.
    Anyone else ran into an issue with an external monitor NOT going to sleep when plugged into the HDMI adapter? Someone suggusted that I purchase a DVI-D adapter, and use that cable... but that sounds ridiculous. The HDMI adapter should absolutely work.
    My temporary fix is to turn off the monitor everytime (if i remember) otherwise the display is in this never ending loop of trying to shut down.
    And yes, the Macbook Air is 100% up to date with updates. DRIVING ME CRAZY!!!

    Hello Joe,
    I definitely understand your concern regarding your external display not going to sleep and endlessly looping into power save mode when your MacBook Air is asleep. 
    I found an article with steps to troubleshoot issues with displays.  This article is for internal and external displays, so you can skip any steps referring to the internal display.  The following steps specifically stands out to me for the situation you are experiencing:
    Reset the system
    You can reset the Mac's parameter RAM and SMC.
    You can find the full article here:
    Apple computers: Troubleshooting issues with video on internal or external displays
    Thank you for using Apple Support Communities.
    Sheila M.

  • History will not clear using Firefox under Mac OS 10.9.2

    Cannot clear the history. No matter what I do, I'm stuck with junk left over in the History drop-down (Sears and Lowes sites always show up). Tried uninstalling/reinstalling without success. The same sites still show up. Tried going to ~Library/Application Support/Firefox but that folder doesn't exist. How can I clear my history, and more importantly be certain my computer is not being loaded up with retained junk left behind by the browser?

    You can check the places.sqlite database.
    Remove all places.sqlite file(s) in the Firefox profile folder to make Firefox rebuild the places.sqlite database from the most recent JSON backup (bookmarks-####-##-##_xx.json) in the bookmarkbackups folder.

  • Disable second monitor when not in use

    Topic says it....I'm using SwitchResX and for the most part it works ok...I have a second monitor that I use sometimes...I'd like an app that I can just say "disable the second monitor" so that it will not show up in Display Prefs, AND will go into power sleep mode...anyone seen anything like this?  Thanks all.

    According to this thread, SwitchResX allows you to do exactly what you're looking for.  It's right on the webpage:
    You can disable or deactivate a monitor without having to physically unplug it, allowing you to use a laptop in clamshell mode with external monitor, keyboard and mouse

  • Pictures taken with Ipad are not clear

    Pictures are not clear using my Ipad. Please help

    When you say "other Ipads" do you mean other iPad 2s or the New iPads.  The New iPad has a 5 megapixel camera and will take better pictures.  If you compared it to other Ipad 2s, check to make sure the camera lenses are clean are not covered.  iPads come with clear plastic over the lens on the back for protection.

  • OBIEE:Cache is not clearing

    cache is not clearing in obiee setup.I did the following things rpd in online mode and purged all the cache entries
    2.opened obiee answers(session log) .clicked on "close all cursors", cache entries are removed.but if i again opened the session log "same cache entries are still there"
    pls help to resolve the problem

    Hi mervin,
    This would solve your problem.
    Hope it helps you,

  • Apex not clearing cache

    Using Apex 4.1.1 on Oracle XE 11G (Linux)
    I have a form and a report in and when you click on create button it will clear the cache in page 6 so you can create a new entry.
    If click on the link on table which will set the value of P6_TID (type hidden) with a value, the typical Form & Report setup except I created it manually and was working fine for over a month since creation.
    Now when I click on the CREATE button its no longer clearing cache in page 6. Instead it retrieves the latest values I had earlier (P6_TID holding the latest value).
    However just earlier I was having another issue where I had to drop the parsing schema and got ORA-01940 - cannot drop a user that currently logged in, so I had to do a:
    SQL> shutdown immediate;and as soon as Oracle stopped I started it up and created my user, granted necessary permissions and imported the old DMP file.
    I've gone through this step many times but only now I am getting the ORA-01940 error. So have no idea if its anything to do with the issue of clearing cache I am having. Both issue coincided same time.
    Has anyone had any such problem where they are unable to clear cache for a page or session? I got absolutely know idea what I have to do get it back working.

    Why would you shut down your database to kick a user. Just do
      select * from v$sessionYou can find your schema that you want to drop with a where clause on the user column.
    Now note the sid and the serial column and do
      alter system kill session '#SID#, #SERIAL#';Replace #SID# and #SERIAL# with the values of your session you want to kill.
    This will stop the ORA-01940 error.
    Now for the APEX matter. The APEX session is completely different from the Database session.
    If you submit values to the server then APEX keeps those values in session.
    If you clear the cache of a page it really means that you clear the values of that page in the session.
    Look in your session if those page items are cleared.
    If they are not cleared there then watch out for a unwanted rowfetch of page processes. If you clear the page cache on create you most not give away any variables to that page hee! (espacially not a primary key)

  • Clear cache does not clear all the cache

    After clearing the cache, the browser assumes some of the files are still cached so it won't try to get the file from the server. This causes the website to hang as it does not timeout.
    It does not always happen, for example in my machine is OK, but a colleague's machine has it consistently and other people too.
    The only way that they could make it work is going to about:support and doing a reset.
    The Troubleshooting Information I've added is from the problematic machine.

    They use the built-in means to clear the cache.
    Tried deleting the cache folder but it did not help.
    Tried also deleting the profile folder contents and it did work. I guess that is similar to reset functionality.
    Still, if clearing the cache folder worked would be a a workaround for us, as developers but not something we could ask from our customers.
    You can try it with this URL:
    Again, they are able to load it for the first time, but if they clear the cache, they cannot get the response from that url, in fact there is not even a request from the browser.

  • HT6195 Safari cache will not clear......cannot get to current version of website.

    I design our company website.  It was recently moved from Hostgator to Flywheel and I am unable to open a current version of the site or make changes via the admin page on Word Press and have it go live.  I have tried to clear the cache, but it will not clear.  Also, this is happening on my iPad 2 and my husbands MacBook Pro.  I cannot un-install safari because Maverick's won't let me.  I AM able to make changes and see the current live version on the Dell PC laptop I have.  Any ideas???

    If it only happened in one location, that would occurs when mobile, at work, at home, everywhere.  Thanks for the thought though.

  • I cleared the cache and my site does not update!  What's the secret?

    I cleared the cache and my site does not update! What's the secret? I created a second website and bought a domain name. You can get to the site by it's mac name or the purchased domain name. I linked the domain name and with my server and it works. The site comes up wither way. BUT, either way, I cannot get my changes to appear. I had realized that my links were not working because I had placed them within the header. So, I moved the links out of the header, republished, and now the new pages (with links in body of website) will not load. Here are the two ways to get to see the site. Both show the old way (links in header). What is up with me not being able to see the changes in either Firefox or Safari?

    hello mccormick.lee, please try downloading the full setup file for the current firefox version from and install it on top of your current installation.

  • Firefox will not clear cache

    I tried the beta version of FF 4, and deleted it, then when the full version came out I got it. Every since I had the beta version my FF will not clear the cache, I have tried a dozen ways to get my cache cleared and nothing is working.

    Do you still see that the cache is used if you open the <b>about:plugins</b> page via the location bar?

Maybe you are looking for

  • How to Iterate the VO in ApplicationModuleImpl class

    Hi Gurus, I have a VO displayed as a table in the form. On button click i want to iterate the table and find the selected elements in the ApplicationModuleImpl class. I have created the RowImpl for the VO. How do i iterate the table in the Appliocati

  • Delta options

    hi experts,    I have  a doubt in deltas.wht r the delta options available for the infocubes  and ods? regards, kumar.

  • Contacts entered on iPhone 4s suddenly missing, present on iCloud - how to recover?

    Wife's iPhone 4s has out-of-date Yahoo contacts, but is suddenly missing all of the contact information she has entered on the iPhone itself. iCloud sync is currently disabled - apparently by default when upgraded to iOS 7? - but when we login to iCl

  • Export H.264 & HDV for BluRay

    I have a project that consists of H.264 720 30p footage from a Canon T1i and HDV 1080 60i from a Sony Camcorder. The final output of the project will be on bluray, I am looking for suggestions on how to put this all together? There is less HDV footag

  • How to find JFrame border width?

    Hi, I need to find out the left & right border widths of a JFrame. This is easy if I have an existing object (assuming it's been painted at least once). The border width may vary depending on the current look & feel, whether running on windows or the