Hi Tim

Setting the jmxName to null on the composite cache manager should do the
trick but depending the api you use is more or less easy. Can you have a
look?

Le 16 nov. 2017 21:54, "Tim Cronin" <t...@outboundengine.com> a écrit :

we have a few webapps running on the same server that use JCS.

when moving the 2.x we started getting the following error on tomcat startup



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:172)
    at org.apache.commons.jcs.JCS.getInstance(JCS.java:190)
    at com.outboundengine.cache.Cache.<init>(Cache.java:42)
    at com.outboundengine.cache.CacheManager.<init>(CacheManager.java:37)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:62)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

Reply via email to