Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-196

Getting an issue with commons-jcs-core 2.0 version, which is InstanceAlreadyExistsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • jcs-2.0
    • jcs-3.0
    • Composite Cache
    • None

    Description

      Hi,

      I have recently tried using JCS 2.0 version. my intention is to improve the performance of my application since my application communicates data base frequently. So, i have implemented a single service on cache, and when i run this service as a standalone(not through web module, but using main method in java), i am able to prove that the call is going to cache for sure for second time since the first call must go to data base. And, finally my issue is, when i deploy the same application, which has cache implementation, and run the web module, i am getting below exception. Can you please solve it as soon as possible since i am dead line. and if possible, can you share a best cache.ccf file for best config. 

       

      Exception details

      --------------------------------------

      2019-01-04 16:47:49.426 WARN com.XXXX.XXX.service.agent.XXManagementAgent - Found potential problem class org.apache.commons.jcs.utils.servlet.JCSServletContextListener: implements ServletContextListener
      2019-01-04 16:47:49.426 WARN com.XXXX.XXX.service.agent.XXManagementAgent - Found potential problem class org.apache.tomcat.websocket.server.WsContextListener: implements ServletContextListener
      2019-01-04 16:47:49.426 WARN com.XXXX.XXX.service.agent.XXManagementAgent - Found potential problem class org.apache.commons.logging.impl.ServletContextCleaner: implements ServletContextListener
      2019-01-04 16:47:49.426 WARN com.XXXX.XXX.service.agent.XXManagementAgent - Found potential problem class com.XXXX.otag.service.agent.ServiceBootstrapListener: implements ServletContextListener

       

      org.apache.commons.jcs.engine.control.CompositeCacheManager - Could not register JMX bean.
      javax.management.InstanceAlreadyExistsException: org.apache.commons.jcs:type=JCSAdminBean
      at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
      at org.apache.commons.jcs.engine.control.CompositeCacheManager.initialize(CompositeCacheManager.java:271)
      at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:185)
      at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:161)
      at org.apache.commons.jcs.JCS.getCacheManager(JCS.java:156)
      at org.apache.commons.jcs.JCS.getInstance(JCS.java:174)

       

      ---------------------------------------------------------------

      Note: If you share any solution, please give it us with a sample code.

       

      thanks,

      Naga.

      Attachments

        Activity

          People

            tv Thomas Vandahl
            kumarnaga naga kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: