[ 
https://issues.apache.org/jira/browse/QPID-8060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286001#comment-16286001
 ] 

Keith Wall commented on QPID-8060:
----------------------------------


* * The AMQP 0-10 behaviour for {{queue.declare}} when the alternateExchange is 
not recognised is incorrect.  The specification states that the 
{{unknown-exchange}} must be raised, not {{illegal-argument}}.    I notice 
{{exchange.declare}} already has the right behaviour.  
* 
org.apache.qpid.server.model.UnknownConfiguredObjectException#UnknownConfiguredObjectException(java.lang.String,
 java.lang.Class<? extends org.apache.qpid.server.model.ConfiguredObject>, 
java.lang.String) is designed to take a category class:  {{ConfiguredObject}} 
is not a category.     Perhaps 
org.apache.qpid.server.exchange.AbstractExchange#validateOrCreateAlternateBinding
 should not throw a {{UnknownConfiguredObjectException}} but something 
alternate binding specific.   

> [Broker-J] [AMQP 0-8..0-9-1] Declaring queue with not existing alternate 
> binding crashes the Broker
> ---------------------------------------------------------------------------------------------------
>
>                 Key: QPID-8060
>                 URL: https://issues.apache.org/jira/browse/QPID-8060
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-7.0.0
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>             Fix For: qpid-java-broker-7.0.1
>
>
> Declaring queue with not existing alternate binding crashes the Broker with 
> the following stack trace:
> {noformat}
> org.apache.qpid.server.configuration.IllegalConfigurationException: Cannot 
> create alternate binding for 'test' : Alternate binding destination 
> 'not_existing' cannot be found.
>       at 
> org.apache.qpid.server.queue.AbstractQueue.validateOrCreateAlternateBinding(AbstractQueue.java:3537)
>       at 
> org.apache.qpid.server.queue.AbstractQueue.onCreate(AbstractQueue.java:320)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doCreation(AbstractConfiguredObject.java:1273)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:893)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:866)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:637)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:630)
>       at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248)
>       at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:165)
>       at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:153)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:629)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:865)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:75)
>       at 
> org.apache.qpid.server.queue.QueueFactory.createAsync(QueueFactory.java:58)
>       at 
> org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:145)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject.addChildAsync(AbstractConfiguredObject.java:2143)
>       at 
> org.apache.qpid.server.virtualhost.AbstractVirtualHost.addChildAsync(AbstractVirtualHost.java:857)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2100)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2095)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:637)
>       at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:630)
>       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:111)
>       at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58)
>       at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at 
> org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464)
>       at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Client code:
> {code}
> Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
> AMQSession<?,?> amqSession = (AMQSession<?, ?>)session;
> final Map<String, Object> arguments = new HashMap<>();
> arguments.put("alternateExchange", "not_existing");
> amqSession.sendCreateQueue("test", false, true, false, arguments);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to