1 Reply Latest reply on Mar 13, 2007 10:45 PM by brian.stansberry

    InstanceNotFoundException: jboss.system:service=ServiceContr

    augustientje

      I'm trying to use JbossCache (1.4.0) outside Jboss AS as a local cache.

      The code fragment I'm trying to get to work is very simple:

      TreeCache treeCache = new TreeCache();
      // ... configure
      
      treeCache.create();
      treeCache.start();
      
      // ... do something with cache
      
      treeCache.stop();
      treeCache.destroy();
      


      This throws an InstanceNotFoundException with the message "jboss.system:service=ServiceController".

      As an alternative, I tried using the createService/startService and stopService/destroyService methods instead, but this throws the same exception (although this time it doesn't reach my application since it's eaten in TreeCache.postDeregister).

      What could be the cause of this?

        • 1. Re: InstanceNotFoundException: jboss.system:service=ServiceC
          brian.stansberry

          This is a bug; I'll file a JIRA tomorrow. The correct thing to do is to use createService(), startService(), etc. But the WARN that gets logged in postRegister() is a bug. Fairly harmless though; only harm is the spurious WARN. The method actually does what it needs to.

          A workaround, if you don't care about the cache and its interceptors being visible in JMX, is to configure the cache with property UseInterceptorMBeans set to false.