Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
qpid-java-broker-9.1.0
-
None
Description
If queue has a consumer and exclusive mode is set to CONNECTION, then changing queue exclusive mode to PRINCIPAL or CONTAINER will throw exception below. Then no consumer is able to consume messages from queue and broker's webgui fails to show Edit Queue dialog again.
Steps to reproduce:
- set queue exclusive mode to CONNECTION in broker's webgui
- connect to queue
- set queue exclusive mode to PRINCIPAL or CONTAINER in broker's webgui
- exception should be thrown
2024-01-16T09:30:55,432Z INFO [VirtualHostNode-default-Config] (q.m.q.update) - [mng:uO4gG/VX(admin@/127.0.0.1:45136)] [vh(/default)/qu(broadcast.CAREX_TESTCALMMACC1.Public)] QUE-1017 : Update : "broadcast.CAREX_TESTCALMMACC1.Public" : FAILURE : {alternateBinding=null,exclusive=PRINCIPAL} 2024-01-16T09:30:55,435Z WARN [qtp398517223-54] (o.a.q.s.m.p.ManagementException) - Unexpected Exception java.lang.ClassCastException: class java.lang.String cannot be cast to class java.security.Principal (java.lang.String and java.security.Principal are in module java.base of loader 'bootstrap') at org.apache.qpid.server.queue.AbstractQueue.getOwner(AbstractQueue.java:776) at jdk.internal.reflect.GeneratedMethodAccessor85.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.qpid.server.model.ConfiguredObjectMethodAttributeOrStatistic.getValue(ConfiguredObjectMethodAttributeOrStatistic.java:68) at org.apache.qpid.server.model.ConfiguredObjectMethodAttribute.getValue(ConfiguredObjectMethodAttribute.java:29) at org.apache.qpid.server.model.AbstractConfiguredObject.getAttribute(AbstractConfiguredObject.java:1792) at org.apache.qpid.server.model.AbstractConfiguredObject$9.lambda$getAttributes$0(AbstractConfiguredObject.java:1916) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAs(Subject.java:361) at org.apache.qpid.server.model.AbstractConfiguredObject$9.getAttributes(AbstractConfiguredObject.java:1906) at org.apache.qpid.server.store.JsonFileConfigStore.update(JsonFileConfigStore.java:420) at org.apache.qpid.server.configuration.store.StoreConfigurationChangeListener.bulkChangeEnd(StoreConfigurationChangeListener.java:98) at org.apache.qpid.server.model.AbstractConfiguredObject.bulkChangeEnd(AbstractConfiguredObject.java:3030) at org.apache.qpid.server.model.AbstractConfiguredObject.changeAttributes(AbstractConfiguredObject.java:3065) at org.apache.qpid.server.queue.AbstractQueue.changeAttributes(AbstractQueue.java:3369) at org.apache.qpid.server.model.AbstractConfiguredObject$19.setAttributes(AbstractConfiguredObject.java:2914) at org.apache.qpid.server.model.AbstractConfiguredObject$19.execute(AbstractConfiguredObject.java:2896) at org.apache.qpid.server.model.AbstractConfiguredObject$19.execute(AbstractConfiguredObject.java:2889) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.lambda$call$0(TaskExecutorImpl.java:317) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAs(Subject.java:361) at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:313) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75)