Confluence is failing with following error:
2020-05-08 09:10:31,371 ERROR [localhost-startStop-1] [ContainerBase.[Standalone].[localhost].[/]] log Exception starting filter [jmx]
javax.management.RuntimeOperationsException
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:413)
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.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)
at org.springframework.jmx.export.MBeanExporter.registerManagedResource(MBeanExporter.java:486)
at com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl.registerManagedResource(MBeanExporterWithUnregisterImpl.java:125)
at com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl.safeRegisterManagedResource(MBeanExporterWithUnregisterImpl.java:116)
at com.atlassian.confluence.jmx.JmxFilter.safeRegisterObject(JmxFilter.java:132)
at com.atlassian.confluence.jmx.JmxFilter.doMailServer(JmxFilter.java:79)
at com.atlassian.confluence.jmx.JmxFilter.registerBeans(JmxFilter.java:63)
at com.atlassian.confluence.jmx.JmxFilter.init(JmxFilter.java:45)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4491)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name Confluence:name=MailServer-Proxy?
Using steps descrbes in https://confluence.atlassian.com/confkb/unable-to-start-confluence-due-to-jmx-182158269.html doesn't work - it fails with:
2020-05-11 11:51:39,031 ERROR [localhost-startStop-1] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exporter' defined in class path resource [jmxContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'enabled' of bean class [com.atlassian.confluence.jmx.MBeanExporterWithUnregisterImpl]: Bean property 'enabled' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
But when I use jmxContext.xml from source code of mine version confluence it gives initial error:
Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name Confluence:name=MailServer-Proxy?