Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
qpid-java-broker-7.0.0
-
None
Description
Implementation of VirtualHostUserOrConnectionLogInclusionRule incorrectly casts VirtualHostLogger and VirtualHostUserOrConnectionLogInclusionRule to BrokerLogger and BrokerUserOrConnectionLogInclusionRule accordingly.
As result, It is impossible to create and update VirtualHostUserOrConnectionLogInclusionRule
Here are the examples of reported ClassCastException
java.lang.ClassCastException: org.apache.qpid.server.logging.logback.VirtualHostFileLoggerImplWithAccessChecking cannot be cast to org.apache.qpid.server.model.BrokerLogger at org.apache.qpid.server.logging.logback.VirtualHostUserOrConnectionLogInclusionRuleImplFactory.createInstance(VirtualHostUserOrConnectionLogInclusionRuleImplFactory.java:39) at org.apache.qpid.server.logging.logback.VirtualHostUserOrConnectionLogInclusionRuleImplFactory.createInstance(VirtualHostUserOrConnectionLogInclusionRuleImplFactory.java:28) at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:74) at org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:145) at org.apache.qpid.server.model.AbstractConfiguredObject.addChildAsync(AbstractConfiguredObject.java:2113) at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2070) at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2065) at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:639) at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:320) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:360) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:313) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464) at java.lang.Thread.run(Thread.java:748)
java.lang.ClassCastException: com.sun.proxy.$Proxy23 cannot be cast to org.apache.qpid.server.logging.logback.BrokerUserOrConnectionLogInclusionRule at org.apache.qpid.server.logging.logback.VirtualHostUserOrConnectionLogInclusionRuleImpl.validateChange(VirtualHostUserOrConnectionLogInclusionRuleImpl.java:57) at org.apache.qpid.server.model.AbstractConfiguredObject$25.execute(AbstractConfiguredObject.java:2929) at org.apache.qpid.server.model.AbstractConfiguredObject$25.execute(AbstractConfiguredObject.java:2922) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:320) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:360) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:313) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464) at java.lang.Thread.run(Thread.java:748)