Hi all,I'm trying to update my Hessian over AMQP RPC client [1] to the latest version of Qpid but I have some difficulties with the Connection class in the org.apache.qpid.transport. I know this class is not intended for public use and as such is not supported, but I would be very grateful if someone could give me some insights.
In the previous version of Qpid (up to 0.12) I was able to open a connection simply with this:
Connection conn = new Connection();
conn.connect(hostname, port, virtualhost, user, password);
However now with Qpid 0.14 this results in a NullPointerException:
Caused by: java.lang.NullPointerException
at
org.apache.qpid.transport.ProtocolHeader.delegate(ProtocolHeader.java:110)
at org.apache.qpid.transport.Connection.received(Connection.java:387)
at org.apache.qpid.transport.Connection.received(Connection.java:66)
at org.apache.qpid.transport.network.Assembler.emit(Assembler.java:95)
at org.apache.qpid.transport.network.Assembler.init(Assembler.java:115)
at
org.apache.qpid.transport.ProtocolHeader.delegate(ProtocolHeader.java:115)
at
org.apache.qpid.transport.network.Assembler.received(Assembler.java:100)
at
org.apache.qpid.transport.network.Assembler.received(Assembler.java:42)
at
org.apache.qpid.transport.network.InputHandler.next(InputHandler.java:151)
at
org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:103)
at
org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:42)
at
org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:153)
As I understand this is caused by the ConnectionDelegate in Connection
that is not initialized. This delegate already existed in Qpid 0.10-0.12
but didn't cause this problem before.
I tried initializing the delegate manually but it seems a bit complicated. Since I only depend on the Qpid Common jar I can only use the ClientDelegate, but it is incomplete, it breaks when the SASL client is created with an UnsupportedOperationException(even if I don't use SASL).
At this point I'm a bit lost. Couldn't the delegate be initialized automatically with a basic implementation and SASL not checked if it's not used? Is the delegate essential for establishing the connection?
Emmanuel Bourg [1] http://ebourg.github.com/qpid-hessian
smime.p7s
Description: S/MIME Cryptographic Signature
