With the Camel upgrade from https://issues.opennms.org/browse/HZN-1094, we should now support AMQP 1.0, but the AMQP forwarder fails with the following when trying to connect to an AMQP 1.0 compliant broker (ActiveMQ 5.15.2):
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
It turns out that we are overriding the version of the qpid client library and the connection factory being used. This was done since there were issues with the ones provided by Camel, so we pinned them at higher versions.
This is no longer necessary now that we've upgraded Camel, and we can use the client and connection factory provided by the default component.
With the Camel upgrade from https://issues.opennms.org/browse/HZN-1094, we should now support AMQP 1.0, but the AMQP forwarder fails with the following when trying to connect to an AMQP 1.0 compliant broker (ActiveMQ 5.15.2):
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