You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Rajika Kumarasiri <ra...@wso2.com> on 2011/03/29 12:15:30 UTC

NPE while processing the data block

I came across the following NPE, when trying to use the broker against a
client(Publisher.java). The Qpid server is configured for SSL and client
connect using the url:

"amqp://guest:guest@test/?brokerlist='tcp://localhost:8672?ssl='true''"

2011-03-29 15:34:43,478 ERROR [pool-3-thread-1] (AMQProtocolEngine.java:258)
- Unexpected exception when processing datablock
java.lang.NullPointerException
    at
org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
    at
org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
    at
org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
    at
org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
    at
org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
    at org.apache.qpid.pool.Job.processAll(Job.java:110)
    at org.apache.qpid.pool.Job.run(Job.java:149)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)


The reason is session.getProtocolVersion() returns 0-10 in
ProtocolOutputConverterRegistry#getConverter and the lookup returns null.
Because we only register versions 0.8, 0.9 and 0.91 in the static block in
the same class. Is there any reason to left out version 0-10? Also I don't
see any protocol conversion source in the package
org.apache.qpid.server.output. Is this on purpose or still under development
?

BTW, I fixed an issue related to broker's SSL support and will attach that
patch soon.


Rajika

Re: NPE while processing the data block

Posted by Robert Godfrey <ro...@gmail.com>.
On 30 March 2011 00:22, Andrew Kennedy <an...@gmail.com>wrote:

> On 29 March 2011 18:57, Robert Godfrey <ro...@gmail.com> wrote:
> > On 29 March 2011 19:31, Rajika Kumarasiri <ra...@wso2.com> wrote:
> >> I have a one last question on the patch. I have registered SSL protocol
> >> handler as the last handler in the chain where you have registered as
> the
> >> first ( see below for the diff). Please also refer [0]. And yes I tested
> >> with following changes.
> >>
> >> Rajika
> >>
> >> @@ -363,7 +367,9 @@
> >>          {
> >>              if (_sslFactory != null)
> >>              {
> >> -
> >> protocolSession.getFilterChain().addBefore("protocolFilter",
> "sslFilter",
> >> +//
> >> protocolSession.getFilterChain().addBefore("protocolFilter",
> "sslFilter",
> >> +//                        new
> >> SSLFilter(_sslFactory.buildServerContext()));
> >> +                protocolSession.getFilterChain().addLast("sslFilter",
> >>                          new
> SSLFilter(_sslFactory.buildServerContext()));
> >>
> >
> > To be completely honest on debugging I found that there was only one
> filter
> > in the chain at the point this code gets called...  I just thought that
> > "first" for the SSL filter seemed more sensible that "last" (since you
> want
> > SSL decrypt before anything else) and so that's what I tried... it
> worked...
> > and I gave it no more thought :-)
>
> Hi.
>
> In my update to the networking stack I decided on adding SSL first as
> well. There *are* other filters that may or may not be added, which
> should come after this. For example, I experimented with logging and
> executor filters, and there is the write and read buffer filtering
> too. Also, Rob, I take it you'll remove the commented out lines of
> code when this is checked in? Anyone interested in the history can
> browse SVN if they want.
>
>
Yeah - there's other tidying I'd want to do to cut out all the duplication
around excludes... I'd just quickly hacked it to work over the weekend - the
other thing that needs to be added are some tests so that we can see if
someone ever breaks SSL again.

-- Rob

Re: NPE while processing the data block

Posted by Andrew Kennedy <an...@gmail.com>.
On 29 March 2011 18:57, Robert Godfrey <ro...@gmail.com> wrote:
> On 29 March 2011 19:31, Rajika Kumarasiri <ra...@wso2.com> wrote:
>> I have a one last question on the patch. I have registered SSL protocol
>> handler as the last handler in the chain where you have registered as the
>> first ( see below for the diff). Please also refer [0]. And yes I tested
>> with following changes.
>>
>> Rajika
>>
>> @@ -363,7 +367,9 @@
>>          {
>>              if (_sslFactory != null)
>>              {
>> -
>> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
>> +//
>> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
>> +//                        new
>> SSLFilter(_sslFactory.buildServerContext()));
>> +                protocolSession.getFilterChain().addLast("sslFilter",
>>                          new SSLFilter(_sslFactory.buildServerContext()));
>>
>
> To be completely honest on debugging I found that there was only one filter
> in the chain at the point this code gets called...  I just thought that
> "first" for the SSL filter seemed more sensible that "last" (since you want
> SSL decrypt before anything else) and so that's what I tried... it worked...
> and I gave it no more thought :-)

Hi.

In my update to the networking stack I decided on adding SSL first as
well. There *are* other filters that may or may not be added, which
should come after this. For example, I experimented with logging and
executor filters, and there is the write and read buffer filtering
too. Also, Rob, I take it you'll remove the commented out lines of
code when this is checked in? Anyone interested in the history can
browse SVN if they want.

Andrew.
--
-- andrew d kennedy ? edinburgh : +44 7582 293 255

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: NPE while processing the data block

Posted by Rajika Kumarasiri <ra...@wso2.com>.
On Tue, Mar 29, 2011 at 11:27 PM, Robert Godfrey <ro...@gmail.com>wrote:

>
>
> On 29 March 2011 19:31, Rajika Kumarasiri <ra...@wso2.com> wrote:
>
>> BTW,
>> I have a one last question on the patch. I have registered SSL protocol
>> handler as the last handler in the chain where you have registered as the
>> first ( see below for the diff). Please also refer [0]. And yes I tested
>> with following changes.
>>
>> Rajika
>>
>> @@ -363,7 +367,9 @@
>>          {
>>              if (_sslFactory != null)
>>              {
>> -
>> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
>> +//
>> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
>> +//                        new
>> SSLFilter(_sslFactory.buildServerContext()));
>> +                protocolSession.getFilterChain().addLast("sslFilter",
>>                          new SSLFilter(_sslFactory.buildServerContext()));
>>
>>
>> [0] -
>> http://svn.apache.org/repos/asf/mina/trunk/mina-example/src/main/java/org/apache/mina/example/echoserver/Main.java
>>
>>
>>
>
> To be completely honest on debugging I found that there was only one filter
> in the chain at the point this code gets called...  I just thought that
> "first" for the SSL filter seemed more sensible that "last" (since you want
> SSL decrypt before anything else) and so that's what I tried... it worked...
> and I gave it no more thought :-)
>
>
+1. Are you planning to port this changes to trunk? I think this patch is
good to apply.

Rajika

Re: NPE while processing the data block

Posted by Robert Godfrey <ro...@gmail.com>.
On 29 March 2011 19:31, Rajika Kumarasiri <ra...@wso2.com> wrote:

> BTW,
> I have a one last question on the patch. I have registered SSL protocol
> handler as the last handler in the chain where you have registered as the
> first ( see below for the diff). Please also refer [0]. And yes I tested
> with following changes.
>
> Rajika
>
> @@ -363,7 +367,9 @@
>          {
>              if (_sslFactory != null)
>              {
> -
> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
> +//
> protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
> +//                        new
> SSLFilter(_sslFactory.buildServerContext()));
> +                protocolSession.getFilterChain().addLast("sslFilter",
>                          new SSLFilter(_sslFactory.buildServerContext()));
>
>
> [0] -
> http://svn.apache.org/repos/asf/mina/trunk/mina-example/src/main/java/org/apache/mina/example/echoserver/Main.java
>
>
>

To be completely honest on debugging I found that there was only one filter
in the chain at the point this code gets called...  I just thought that
"first" for the SSL filter seemed more sensible that "last" (since you want
SSL decrypt before anything else) and so that's what I tried... it worked...
and I gave it no more thought :-)

-- Rob


>
> On Tue, Mar 29, 2011 at 10:54 PM, Rajika Kumarasiri <ra...@wso2.com>wrote:
>
>> I tested the patch and now everything works fine. Please go ahead and
>> apply the changes, or do you want me to create a JIRA issue to keep track
>> this ?
>>
>>
>> Rajika
>>
>>
>> On Tue, Mar 29, 2011 at 4:39 PM, Rajika Kumarasiri <ra...@wso2.com>wrote:
>>
>>> hi Rob,
>>> Your second change is the exact change that I did to get the SSL to work.
>>> I'll attach your patch and let you know.
>>>
>>> Thanks!
>>>
>>> Rajika
>>>
>>>
>>> On Tue, Mar 29, 2011 at 4:34 PM, Robert Godfrey <rob.j.godfrey@gmail.com
>>> > wrote:
>>>
>>>> Hi Rajika,
>>>>
>>>> there's actually two issues which need fixing to get SSL support in the
>>>> broker (by coincidence I happened to be looking at this over the weekend) -
>>>> and by the looks of the problem you are reporting you've only fixed one of
>>>> them...
>>>>
>>>> try the attached patch for the trunk broker and see if this resolves
>>>> your SSL issues
>>>>
>>>> Cheers,
>>>> Rob
>>>>
>>>>
>>>> On 29 March 2011 12:15, Rajika Kumarasiri <ra...@wso2.com> wrote:
>>>>
>>>>> I came across the following NPE, when trying to use the broker against
>>>>> a
>>>>> client(Publisher.java). The Qpid server is configured for SSL and
>>>>> client
>>>>> connect using the url:
>>>>>
>>>>> "amqp://guest:guest@test
>>>>> /?brokerlist='tcp://localhost:8672?ssl='true''"
>>>>>
>>>>> 2011-03-29 15:34:43,478 ERROR [pool-3-thread-1]
>>>>> (AMQProtocolEngine.java:258)
>>>>> - Unexpected exception when processing datablock
>>>>> java.lang.NullPointerException
>>>>>    at
>>>>>
>>>>> org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
>>>>>    at
>>>>>
>>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
>>>>>    at
>>>>>
>>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
>>>>>    at
>>>>>
>>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
>>>>>    at
>>>>>
>>>>> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
>>>>>    at org.apache.qpid.pool.Job.processAll(Job.java:110)
>>>>>    at org.apache.qpid.pool.Job.run(Job.java:149)
>>>>>    at
>>>>>
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>>>    at
>>>>>
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>>>    at java.lang.Thread.run(Thread.java:619)
>>>>>
>>>>>
>>>>> The reason is session.getProtocolVersion() returns 0-10 in
>>>>> ProtocolOutputConverterRegistry#getConverter and the lookup returns
>>>>> null.
>>>>> Because we only register versions 0.8, 0.9 and 0.91 in the static block
>>>>> in
>>>>> the same class. Is there any reason to left out version 0-10? Also I
>>>>> don't
>>>>> see any protocol conversion source in the package
>>>>> org.apache.qpid.server.output. Is this on purpose or still under
>>>>> development
>>>>> ?
>>>>>
>>>>> BTW, I fixed an issue related to broker's SSL support and will attach
>>>>> that
>>>>> patch soon.
>>>>>
>>>>>
>>>>> Rajika
>>>>>
>>>>
>>>>
>>>
>>
>

Re: NPE while processing the data block

Posted by Rajika Kumarasiri <ra...@wso2.com>.
BTW,
I have a one last question on the patch. I have registered SSL protocol
handler as the last handler in the chain where you have registered as the
first ( see below for the diff). Please also refer [0]. And yes I tested
with following changes.

Rajika

@@ -363,7 +367,9 @@
         {
             if (_sslFactory != null)
             {
-
protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
+//
protocolSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
+//                        new SSLFilter(_sslFactory.buildServerContext()));
+                protocolSession.getFilterChain().addLast("sslFilter",
                         new SSLFilter(_sslFactory.buildServerContext()));


[0] -
http://svn.apache.org/repos/asf/mina/trunk/mina-example/src/main/java/org/apache/mina/example/echoserver/Main.java


On Tue, Mar 29, 2011 at 10:54 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:

> I tested the patch and now everything works fine. Please go ahead and apply
> the changes, or do you want me to create a JIRA issue to keep track this ?
>
>
> Rajika
>
>
> On Tue, Mar 29, 2011 at 4:39 PM, Rajika Kumarasiri <ra...@wso2.com>wrote:
>
>> hi Rob,
>> Your second change is the exact change that I did to get the SSL to work.
>> I'll attach your patch and let you know.
>>
>> Thanks!
>>
>> Rajika
>>
>>
>> On Tue, Mar 29, 2011 at 4:34 PM, Robert Godfrey <ro...@gmail.com>wrote:
>>
>>> Hi Rajika,
>>>
>>> there's actually two issues which need fixing to get SSL support in the
>>> broker (by coincidence I happened to be looking at this over the weekend) -
>>> and by the looks of the problem you are reporting you've only fixed one of
>>> them...
>>>
>>> try the attached patch for the trunk broker and see if this resolves your
>>> SSL issues
>>>
>>> Cheers,
>>> Rob
>>>
>>>
>>> On 29 March 2011 12:15, Rajika Kumarasiri <ra...@wso2.com> wrote:
>>>
>>>> I came across the following NPE, when trying to use the broker against a
>>>> client(Publisher.java). The Qpid server is configured for SSL and client
>>>> connect using the url:
>>>>
>>>> "amqp://guest:guest@test/?brokerlist='tcp://localhost:8672?ssl='true''"
>>>>
>>>> 2011-03-29 15:34:43,478 ERROR [pool-3-thread-1]
>>>> (AMQProtocolEngine.java:258)
>>>> - Unexpected exception when processing datablock
>>>> java.lang.NullPointerException
>>>>    at
>>>>
>>>> org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
>>>>    at
>>>>
>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
>>>>    at
>>>>
>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
>>>>    at
>>>>
>>>> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
>>>>    at
>>>>
>>>> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
>>>>    at org.apache.qpid.pool.Job.processAll(Job.java:110)
>>>>    at org.apache.qpid.pool.Job.run(Job.java:149)
>>>>    at
>>>>
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>>    at
>>>>
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>>    at java.lang.Thread.run(Thread.java:619)
>>>>
>>>>
>>>> The reason is session.getProtocolVersion() returns 0-10 in
>>>> ProtocolOutputConverterRegistry#getConverter and the lookup returns
>>>> null.
>>>> Because we only register versions 0.8, 0.9 and 0.91 in the static block
>>>> in
>>>> the same class. Is there any reason to left out version 0-10? Also I
>>>> don't
>>>> see any protocol conversion source in the package
>>>> org.apache.qpid.server.output. Is this on purpose or still under
>>>> development
>>>> ?
>>>>
>>>> BTW, I fixed an issue related to broker's SSL support and will attach
>>>> that
>>>> patch soon.
>>>>
>>>>
>>>> Rajika
>>>>
>>>
>>>
>>
>

Re: NPE while processing the data block

Posted by Rajika Kumarasiri <ra...@wso2.com>.
I tested the patch and now everything works fine. Please go ahead and apply
the changes, or do you want me to create a JIRA issue to keep track this ?


Rajika

On Tue, Mar 29, 2011 at 4:39 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:

> hi Rob,
> Your second change is the exact change that I did to get the SSL to work.
> I'll attach your patch and let you know.
>
> Thanks!
>
> Rajika
>
>
> On Tue, Mar 29, 2011 at 4:34 PM, Robert Godfrey <ro...@gmail.com>wrote:
>
>> Hi Rajika,
>>
>> there's actually two issues which need fixing to get SSL support in the
>> broker (by coincidence I happened to be looking at this over the weekend) -
>> and by the looks of the problem you are reporting you've only fixed one of
>> them...
>>
>> try the attached patch for the trunk broker and see if this resolves your
>> SSL issues
>>
>> Cheers,
>> Rob
>>
>>
>> On 29 March 2011 12:15, Rajika Kumarasiri <ra...@wso2.com> wrote:
>>
>>> I came across the following NPE, when trying to use the broker against a
>>> client(Publisher.java). The Qpid server is configured for SSL and client
>>> connect using the url:
>>>
>>> "amqp://guest:guest@test/?brokerlist='tcp://localhost:8672?ssl='true''"
>>>
>>> 2011-03-29 15:34:43,478 ERROR [pool-3-thread-1]
>>> (AMQProtocolEngine.java:258)
>>> - Unexpected exception when processing datablock
>>> java.lang.NullPointerException
>>>    at
>>>
>>> org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
>>>    at
>>>
>>> org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
>>>    at
>>>
>>> org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
>>>    at
>>>
>>> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
>>>    at
>>>
>>> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
>>>    at org.apache.qpid.pool.Job.processAll(Job.java:110)
>>>    at org.apache.qpid.pool.Job.run(Job.java:149)
>>>    at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>    at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>    at java.lang.Thread.run(Thread.java:619)
>>>
>>>
>>> The reason is session.getProtocolVersion() returns 0-10 in
>>> ProtocolOutputConverterRegistry#getConverter and the lookup returns null.
>>> Because we only register versions 0.8, 0.9 and 0.91 in the static block
>>> in
>>> the same class. Is there any reason to left out version 0-10? Also I
>>> don't
>>> see any protocol conversion source in the package
>>> org.apache.qpid.server.output. Is this on purpose or still under
>>> development
>>> ?
>>>
>>> BTW, I fixed an issue related to broker's SSL support and will attach
>>> that
>>> patch soon.
>>>
>>>
>>> Rajika
>>>
>>
>>
>

Re: NPE while processing the data block

Posted by Rajika Kumarasiri <ra...@wso2.com>.
hi Rob,
Your second change is the exact change that I did to get the SSL to work.
I'll attach your patch and let you know.

Thanks!

Rajika

On Tue, Mar 29, 2011 at 4:34 PM, Robert Godfrey <ro...@gmail.com>wrote:

> Hi Rajika,
>
> there's actually two issues which need fixing to get SSL support in the
> broker (by coincidence I happened to be looking at this over the weekend) -
> and by the looks of the problem you are reporting you've only fixed one of
> them...
>
> try the attached patch for the trunk broker and see if this resolves your
> SSL issues
>
> Cheers,
> Rob
>
>
> On 29 March 2011 12:15, Rajika Kumarasiri <ra...@wso2.com> wrote:
>
>> I came across the following NPE, when trying to use the broker against a
>> client(Publisher.java). The Qpid server is configured for SSL and client
>> connect using the url:
>>
>> "amqp://guest:guest@test/?brokerlist='tcp://localhost:8672?ssl='true''"
>>
>> 2011-03-29 15:34:43,478 ERROR [pool-3-thread-1]
>> (AMQProtocolEngine.java:258)
>> - Unexpected exception when processing datablock
>> java.lang.NullPointerException
>>    at
>>
>> org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
>>    at
>>
>> org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
>>    at
>>
>> org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
>>    at
>>
>> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
>>    at
>>
>> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
>>    at org.apache.qpid.pool.Job.processAll(Job.java:110)
>>    at org.apache.qpid.pool.Job.run(Job.java:149)
>>    at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>    at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>    at java.lang.Thread.run(Thread.java:619)
>>
>>
>> The reason is session.getProtocolVersion() returns 0-10 in
>> ProtocolOutputConverterRegistry#getConverter and the lookup returns null.
>> Because we only register versions 0.8, 0.9 and 0.91 in the static block in
>> the same class. Is there any reason to left out version 0-10? Also I don't
>> see any protocol conversion source in the package
>> org.apache.qpid.server.output. Is this on purpose or still under
>> development
>> ?
>>
>> BTW, I fixed an issue related to broker's SSL support and will attach that
>> patch soon.
>>
>>
>> Rajika
>>
>
>

Re: NPE while processing the data block

Posted by Robert Godfrey <ro...@gmail.com>.
Hi Rajika,

there's actually two issues which need fixing to get SSL support in the
broker (by coincidence I happened to be looking at this over the weekend) -
and by the looks of the problem you are reporting you've only fixed one of
them...

try the attached patch for the trunk broker and see if this resolves your
SSL issues

Cheers,
Rob

On 29 March 2011 12:15, Rajika Kumarasiri <ra...@wso2.com> wrote:

> I came across the following NPE, when trying to use the broker against a
> client(Publisher.java). The Qpid server is configured for SSL and client
> connect using the url:
>
> "amqp://guest:guest@test/?brokerlist='tcp://localhost:8672?ssl='true''"
>
> 2011-03-29 15:34:43,478 ERROR [pool-3-thread-1]
> (AMQProtocolEngine.java:258)
> - Unexpected exception when processing datablock
> java.lang.NullPointerException
>    at
>
> org.apache.qpid.server.output.ProtocolOutputConverterRegistry.getConverter(ProtocolOutputConverterRegistry.java:59)
>    at
>
> org.apache.qpid.server.protocol.AMQProtocolEngine.setProtocolVersion(AMQProtocolEngine.java:889)
>    at
>
> org.apache.qpid.server.protocol.AMQProtocolEngine.protocolInitiationReceived(AMQProtocolEngine.java:360)
>    at
>
> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:277)
>    at
>
> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
>    at org.apache.qpid.pool.Job.processAll(Job.java:110)
>    at org.apache.qpid.pool.Job.run(Job.java:149)
>    at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>    at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>    at java.lang.Thread.run(Thread.java:619)
>
>
> The reason is session.getProtocolVersion() returns 0-10 in
> ProtocolOutputConverterRegistry#getConverter and the lookup returns null.
> Because we only register versions 0.8, 0.9 and 0.91 in the static block in
> the same class. Is there any reason to left out version 0-10? Also I don't
> see any protocol conversion source in the package
> org.apache.qpid.server.output. Is this on purpose or still under
> development
> ?
>
> BTW, I fixed an issue related to broker's SSL support and will attach that
> patch soon.
>
>
> Rajika
>