Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6131

ScriptingManager.removeScript throws ISPN026005 exception when the script exists

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.2.0.Final
    • None
    • None
    • None

      ScriptingManager.removeScript() method call with existing script name throws following exception:

      org.infinispan.commons.CacheException: ISPN026005: No script named 'test.js'
      at org.infinispan.scripting.impl.ScriptingManagerImpl.removeScript(ScriptingManagerImpl.java:121)
      at org.infinispan.scripting.ScriptingTest.testRemovingScript(ScriptingTest.java:61)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      ...

      The test code for script removing is:

      public void testRemovingScript() throws Exception {
            assertNotNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js"));
      
            scriptingManager.removeScript("test.js");
            assertNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js"));
         }
      

            [ISPN-6131] ScriptingManager.removeScript throws ISPN026005 exception when the script exists

            UPDATE:

            After 7d0aa92 commit pushed, the exception is not thrown any more. But when removing an existent script, it is only removed from the compiled scripts. The script is still present in the Script cache.
            The same situation refers to the clear() action on Script cache. When the command given below is called, the cache is not cleared only the compiled scripts map is cleared.

            cacheManager.getCache(ScriptingManager.SCRIPT_CACHE)
            

            Anna Manukyan added a comment - UPDATE: After 7d0aa92 commit pushed, the exception is not thrown any more. But when removing an existent script, it is only removed from the compiled scripts. The script is still present in the Script cache. The same situation refers to the clear() action on Script cache. When the command given below is called, the cache is not cleared only the compiled scripts map is cleared. cacheManager.getCache(ScriptingManager.SCRIPT_CACHE)

              ttarrant@redhat.com Tristan Tarrant
              amanukya@redhat.com Anna Manukyan
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: