qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7193) Make legacy client fail in clear manner when connecting to a peer that replies AMQP 1.0
Date Mon, 11 Apr 2016 10:17:25 GMT

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

Keith Wall commented on QPID-7193:

The currently problem is that the protocol specific parts of the client have responsibility
for parsing the AMQP header response.  For example the 0-10 part when faced with a non 0-10
header, parses it as if it were a 0-10 AMQP header, and misinterprets the bytes it finds.

The protocol specific parts of the client should be changed to return the raw header bytes
back to the caller.   A new class should be written capable of recognising any valid AMQP
header.  It should be used to drive the next delegate determination, or produce a reasonable
error message in the AMQP 1.0 case.  It would be nice if this new code were sufficiently smart
to recognise the common mistakes of pointing an AMQP client at a port configured for HTTP,
or a SSL configured port and produce clear error messages

> Make legacy client fail in clear manner when connecting to a peer that replies AMQP 1.0
> ---------------------------------------------------------------------------------------
>                 Key: QPID-7193
>                 URL: https://issues.apache.org/jira/browse/QPID-7193
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>            Reporter: Keith Wall
>             Fix For: qpid-java-6.1
> If the legacy Java Client is connected to the peer that doesn't support its requested
AMQP protocol and responds AMQP 1.0, the Java Client currently fails in a less than clear
> In default configuration, where the 0-10 delegate is used by default, the following is
> {noformat}
> javax.jms.JMSException: Error creating connection: Protocol: 0.0 is required by the broker
but is not currently supported by this client library implementation
> 	at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:134)
> 	at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:57)
> 	at org.apache.qpid.example.Hello.runTest(Hello.java:60)
> 	at org.apache.qpid.example.Hello.main(Hello.java:48)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> Caused by: org.apache.qpid.AMQProtocolException: Protocol: 0.0 is required by the broker
but is not currently supported by this client library implementation [error code 543: client
unsupported protocol]
> 	at org.apache.qpid.client.AMQConnection.initDelegate(AMQConnection.java:644)
> 	at org.apache.qpid.client.AMQConnection.makeConnection(AMQConnection.java:531)
> 	at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:484)
> 	at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:130)
> 	... 8 more
> Caused by: java.lang.ClassNotFoundException: org.apache.qpid.client.AMQConnectionDelegate_0_0
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:190)
> 	at org.apache.qpid.client.AMQConnection.initDelegate(AMQConnection.java:626)
> 	... 11 more
> {noformat}
> If client is configured to use a older protocol (with {{qpid.amqp.version}}), the client
hangs and then times-out.

This message was sent by Atlassian JIRA

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

View raw message