System.NullReferenceException from MassTransit.ServiceBus.Publish(T message)

637 views
Skip to first unread message

shahid

unread,
Mar 17, 2010, 8:55:48 PM3/17/10
to masstransit-discuss
I am seeing a System.NullReferenceException, on the ServiceBus.Publish
call. I have a windows service, which publishes messages to the
service bus, and i am seeing this error, after it publishes over 50k
messages. not sure, if there is some

i noticed a debug message saying "Stopping Consumer Pool.." in the
log. please refer to the log below - the log is from the publisher
side.


2010-03-17 19:01:16,748 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\141731
..
..
..
..
..
2010-03-17 19:34:55,469 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196701
2010-03-17 19:34:55,484 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196702
2010-03-17 19:34:55,500 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196703
2010-03-17 19:34:55,500 [4] DEBUG
MassTransit.Internal.ThreadPoolConsumerPool [(null)] – Stopping
Consumer Pool for msmq://localhost/ApplicationServiceEndpoint
2010-03-17 19:34:55,500 [4] DEBUG
MassTransit.Internal.ThreadPoolConsumerPool [(null)] – Consumer Pool
stopped for msmq://localhost/ApplicationServiceEndpoint
2010-03-17 19:34:56,141 [4] DEBUG
MassTransit.Internal.ThreadPoolConsumerPool [(null)] – Consumer Pool
stopped for msmq://localhost/ApplicationServiceEndpoint


And the exception:

System.NullReferenceException: Object reference not set to an instance
of an object.
at MassTransit.ServiceBus.Publish(T message) in c:\bin\MassTransit\src
\MassTransit\ServiceBus.cs: line 161


before this happens, the messages get published just fine, and are
consumed/processed by application code, hosted on IIS6/win2003/msmq.

please suggest, if you have any ideas to troubleshoot this.

thank you

Dru Sellers

unread,
Mar 17, 2010, 9:14:11 PM3/17/10
to masstrans...@googlegroups.com
what version are you using?
-d


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.


shahid

unread,
Mar 17, 2010, 9:47:06 PM3/17/10
to masstransit-discuss
i am using v. 0.8.0.0

On Mar 17, 8:14 pm, Dru Sellers <d...@drusellers.com> wrote:
> what version are you using?
> -d
>

> > masstransit-dis...@googlegroups.com<masstransit-discuss%2Bunsu...@googlegroups.com>

Dru Sellers

unread,
Mar 17, 2010, 10:31:04 PM3/17/10
to masstrans...@googlegroups.com
You might try pulling the latest from codebetter

-d

Dru Sellers

unread,
Mar 17, 2010, 11:12:31 PM3/17/10
to masstrans...@googlegroups.com
Ok, so looking at the current ServiceBus.cs (since I don't know for sure which one you are using) 161 would appear at best guess to be that your endpoint is null. Does your servicebus have a valid endpoint to listen on?

-d

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.

Shahid Mohammed

unread,
Mar 18, 2010, 12:31:08 AM3/18/10
to masstrans...@googlegroups.com
yes. the service has a valid endpoint. the windows service goes on publishing well over 50k messages. if you have noticed the sequence (highlighted below), you can see that the messages have been processed successfully, before the Stopping Consumer Pool message shows up on the log.

Shahid Mohammed

unread,
Mar 18, 2010, 1:53:47 AM3/18/10
to masstrans...@googlegroups.com
I have tried the scenario with masstransit v.0.8.372.0 and i get the same exception.

at MassTransit.ServiceBus.Publish[T](T message) in d:\BuildAgent-03\work\98b43fc71cf2b2fd\src\MassTransit\ServiceBus.cs:line 157

i have downloaded the latest from
http://teamcity.codebetter.com/repository/download/bt8/10577:id/MassTransit.v0.8.372.91890dacf0c586184f34b4dbe61347051f8507fe.zip

On Wed, Mar 17, 2010 at 9:31 PM, Dru Sellers <d...@drusellers.com> wrote:
You might try pulling the latest from codebetter

-d


On Mar 17, 2010, at 8:47 PM, shahid <shahid....@gmail.com> wrote:

i am using v. 0.8.0.0

On Mar 17, 8:14 pm, Dru Sellers <d...@drusellers.com> wrote:
what version are you using?
-d

On Wed, Mar 17, 2010 at 7:55 PM, shahid <shahid.moham...@gmail.com> wrote:
I am seeing a System.NullReferenceException, on the ServiceBus.Publish
call. I have a windows service, which publishes messages to the
service bus, and i am seeing this error, after it publishes over 50k
messages. not sure, if there is some

i noticed a debug message saying "Stopping Consumer Pool.." in the
log. please refer to the log below - the log is from the publisher
side.

2010-03-17 19:01:16,748 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\141731

..
..
..
..
..
2010-03-17 19:34:55,469 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196701

2010-03-17 19:34:55,484 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196702

2010-03-17 19:34:55,500 [4] DEBUG MassTransit.Msmq.MessageLog [(null)]
– SEND:msmq://localhost/
ApplicationServiceEndpoint:c1348752-0e7c-4328-884f-b95637a87920\196703
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.

Chris Patterson

unread,
Mar 18, 2010, 6:58:45 PM3/18/10
to masstrans...@googlegroups.com
Looks like Dispose is being called on IServiceBus.

Something is either not keeping a reference to it and it is finally getting garbage collected or something is shutting it down explicitly.


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.


Chris Patterson



Reply all
Reply to author
Forward
0 new messages