You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "naga kumar (JIRA)" <ji...@apache.org> on 2019/01/05 04:40:00 UTC

[jira] [Created] (JCS-197) Getting an issue with commons-jcs-core 2.0 version, which is InstanceAlreadyExistsException

naga kumar created JCS-197:
------------------------------

             Summary: Getting an issue with commons-jcs-core 2.0 version, which is InstanceAlreadyExistsException
                 Key: JCS-197
                 URL: https://issues.apache.org/jira/browse/JCS-197
             Project: Commons JCS
          Issue Type: Bug
          Components: Composite Cache, Documentation
    Affects Versions: jcs-2.0
         Environment: windows 10
            Reporter: naga kumar


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,

Nag



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)