Error updating asset
I have various processes to update assets that create, modify and categorize assets, and they work without problems.
But I also have one that just categorizes the existing assets. It just recover the asset and the category from the repository and then assigns the category to the asset. Basically something like that: RAMAsset asset = MethodToRecoverAsset. and then I save the asset with session.put(asset, new NullProgressMonitor()); Finally I call session.release() ; Release works fine, but the call to clear throws the exception: com.ibm.ram.common.data.exception.RAMRuntimeException: java.io.FileNotFoundException: /tmp/local_ram_store/com_ibm_ram_client_RAMSession_362a362a/schemas/http___eidesramp_svb_lacaixa_es_ram_/categorizacindenegocio.xmi (No such file or directory) The directory actually is created and exists during the execution, but apparently is deleted before invoking clear() I use the same method to close the session with all the other processes but this one is the only that doesn't work. Any idea of what can cause this error? Thanks. |
5 answers
Hi,
You actually don't need to be calling clear in this case. release() automatically deletes the cached files and clears all caches in the RAMSession for you. |
One more thing. It isn't clear from your append, but RAMSession's are not multithreaded. You can reuse RAMSessions but a particular instance can't be used at the same time between threads.
|
One more thing. It isn't clear from your append, but RAMSession's are not multithreaded. You can reuse RAMSessions but a particular instance can't be used at the same time between threads. Thanks for your help. Without clear() the code doesn't throw an exception, but when I consult the changed Asset it doesn't appears modified. Is possible that I need to do some modification in the asset beyond assign the new category? The execution is in a single thread. |
Hi,
do asset.refresh(); That will resync it with the host. release() is actually only needed when you are done. It can log you out of the host besides clearing the caches. You shouldn't need to do that if you are going to use it again right away. |
Hi, Thanks for your help. I finally managed to modify the assets. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.