Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8443507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:09:27+00:00 2026-06-10T09:09:27+00:00

I have an NServicebus project that I cannot start after upgrading from 2.6 to

  • 0

I have an NServicebus project that I cannot start after upgrading from 2.6 to 3.2.7
The endpoint look like this:

namespace Customer.Project.SchemaImportService
{
    public class SchemaImportEndpoint : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization
    {
    private IContainer _container;

    public void Init()
    {
        log4net.Config.XmlConfigurator.Configure();
        SetupStructureMap();

        Configure.With()
            .Log4Net()
            .StructureMapBuilder(_container)
            .DisableTimeoutManager()
            .XmlSerializer()
            .CreateBus();
    }

    private void SetupStructureMap()
    {
        // implementation omitted
    }
}

Furthermore, the app.config looks like this:

<configuration>
<configSections>
<section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" />
</configSections>
<MsmqTransportConfig NumberOfWorkerThreads="1" MaxRetries="5" />
<Logging Threshold="DEBUG" /> 
<log4net debug="true"> <!-- logging details omitted -->  </log4net>
<MessageForwardingInCaseOfFaultConfig ErrorQueue="Customer.Project.SchemaImportService.Error" />

When I debug the project I start the NServicebus.Host.exe file, I’ve tried switching profiles (Production, Integration and Lite) with the same result.

The exception that is gives (after leaving the init statement) look like this:

Message: "Exception when starting endpoint, error has been logged. Reason: Object reference not set to an instance of an object."
Source: NserviceBus.Host

StackTrace: at NServiceBus.Hosting.GenericHost.Start() in     c:\TeamCity\buildAgent\work\nsb.master_7\src\hosting\NServiceBus.Hosting\GenericHost.cs:line 45
at NServiceBus.Hosting.Windows.WindowsHost.Start() in     c:\TeamCity\buildAgent\work\nsb.master_7\src\hosting\NServiceBus.Hosting.Windows\WindowsHost.cs:line 56
   at NServiceBus.Hosting.Windows.Program.<>c__DisplayClass8.<Main>b__4(WindowsHost service) in     c:\TeamCity\buildAgent\work\nsb.master_7\src\hosting\NServiceBus.Hosting.Windows\Program.cs:line 97
   at Topshelf.Internal.ControllerDelegates`1.StartActionObject(Object obj) in     c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ControllerDelegates.cs:line 18
   at Topshelf.Internal.IsolatedServiceControllerWrapper`1.<>c__DisplayClass2.    <set_StartAction>b__1(TService service) in    c:\Projects\TopShelfForNSB\src\Topshelf\Internal\IsolatedServiceControllerWrapper.cs:line 65
   at Topshelf.Internal.ServiceController`1.<.cctor>b__1(ServiceController`1 sc) in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ServiceController.cs:line 35
   at Magnum.StateMachine.LambdaAction`1.Execute(T instance, Event event, Object parameter) in :line 0
   at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object     parameter) in :line 0

The following lines get logged in my log file:

INFO  2012-08-21 13:25:24,881 18494ms RoleManager            gureBusForEndpoint - Role NServiceBus.AsA_Server configured
DEBUG 2012-08-21 13:25:25,124 18738ms TransactionalTransport DebugFormat        - Setting throttling to: [1] message/s per second, sleep between receiving message: [800]
FATAL 2012-08-21 13:25:25,158 18772ms GenericHost            Start              - System.NullReferenceException: Object reference not set to an instance of an object.
   at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.NServiceBus.Unicast.Transport.ITransport.Start(Address address)
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction)
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start()
   at NServiceBus.Hosting.GenericHost.Start() in  c:\TeamCity\buildAgent\work\nsb.master_7\src\hosting\NServiceBus.Hosting\GenericHost.cs:line 32

The last bit of information I can provide (but perhaps the most important one), is that if I delete all my messagequeues, the main queue is not automatically recreated.

these private queues get created:

customer.project.schemaimportservice.error
customer.project.schemaimportservice.retries

but the

customer.project.schemaimportservice

queue is missing, even though it matches my namespace (see top of posting).

What am I doing wrong? Must I manually configure the messagequeue name in version 3.2.7?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:09:29+00:00Added an answer on June 10, 2026 at 9:09 am

    I had to include .MsMqTransport() under the Configure.With() section of the Init class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm upgrading a project from NServiceBus 2.6 to 3.0. We have code similar to
I have an existing NServiceBus 2.6 application that I want to start moving to
I have written a mvc that uses nservicebus to publish messages. This works fine
I have an NServiceBus 3.0 endpoint set up to use FluentNHibernate as my ORM
I have a basic nServicebus 3.2.0 setup with a web application endpoint and a
I have a service exposed as WCF via NServiceBus. Ultimately, I'd like to call
I have a use case with NServiceBus explained in this question. Essentially there is
I have duplicate entries in my log file for NServiceBus and I'm concerned this
I have a client-server application that utilises MSMQ and NServiceBus for messaging. During some
I am concerned with my NServiceBus solution. I have a MessageHub that publishes some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.