Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2012/5.0 > BOOK: Patterns, Principles and Practices of Domain-Driven Design
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Patterns, Principles and Practices of Domain-Driven Design
This is the forum to discuss the Wrox book Patterns, Principles and Practices of Domain-Driven Design by Scott Millett; ISBN: 978-1-118-71470-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Patterns, Principles and Practices of Domain-Driven Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2017, 04:15 PM
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question [No longer an Issue] Chapter 12 NServiceBus example throws exception


I have problem running the example.

Specifically, the code below throws exception. Thus, I cannot test the whole example.

Class: Sales.Orders.OrderCreated.PlaceOrderHandler
        public void Handle(PlaceOrder message)
           Bus.Publish(orderCreatedEvent);  //this throws exception 
Exception is at the bottom of the thread.

The link below provided on p187 is not available.

My environment:
1 MSMQ installed on Wins 10
2. I can see all private queues: sales.orders.ordercreated, xxx.retries, xxx.timeouts, xxx.timeoutsdispatcher
3. I have downloaded this, and installed both MSMQ and MSDTC for NServiceBus.

Any idea?

Exception below:
NServiceBus.Persistence.Raven.TimeoutPersister.RavenTimeoutPersistence Raven could not be contacted. We tried to access Raven using the following url: http://localhost:8080.
System.Net.WebException occurred
  Message=Unable to connect to the remote server
   at System.Net.HttpWebRequest.GetResponse()
   at Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 341
   at Raven.Client.Connection.HttpJsonRequest.ReadResponseJson() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 239
   at Raven.Client.Connection.ServerClient.DirectGet(String[] ids, String operationUrl, String[] includes, Boolean metadataOnly) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 1034
   at Raven.Client.Connection.ServerClient.<>c__DisplayClass5e.<Get>b__5d(String u) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 991
   at Raven.Client.Connection.ReplicationInformer.TryOperation[T](Func`2 operation, String operationUrl, Boolean avoidThrowing, T& result) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs:line 559
   at Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication[T](String method, String primaryUrl, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs:line 524
   at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String method, Func`2 operation) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 174
   at Raven.Client.Document.DocumentSession.LoadInternal[T](String[] ids) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentSession.cs:line 340
   at NServiceBus.Persistence.Raven.SubscriptionStorage.RavenSubscriptionStorage.GetSubscriptions(IEnumerable`1 messageTypes, IDocumentSession session)
   at NServiceBus.Persistence.Raven.SubscriptionStorage.RavenSubscriptionStorage.NServiceBus.Unicast.Subscriptions.MessageDrivenSubscriptions.ISubscriptionStorage.GetSubscriberAddressesForMessage(IEnumerable`1 messageTypes)
   at NServiceBus.Unicast.Publishing.StorageDrivenPublisher.Publish(TransportMessage message, IEnumerable`1 eventTypes)
   at NServiceBus.Unicast.Behaviors.DispatchMessageToTransportBehavior.Invoke(SendPhysicalMessageContext context, Action next)
   at NServiceBus.Unicast.Behaviors.SerializeMessagesBehavior.Invoke(SendPhysicalMessageContext context, Action next)
   at NServiceBus.Pipeline.PipelineFactory.Execute[T](BehaviorChain`1 pipelineAction, T context)
   at NServiceBus.Unicast.Behaviors.CreatePhysicalMessageBehavior.Invoke(SendLogicalMessagesContext context, Action next)
   at NServiceBus.Pipeline.PipelineFactory.Execute[T](BehaviorChain`1 pipelineAction, T context)
   at NServiceBus.Pipeline.PipelineFactory.InvokeSendPipeline(SendOptions sendOptions, IEnumerable`1 messages)
   at NServiceBus.Unicast.UnicastBus.Publish[T](T[] messages)
   at Sales.Orders.OrderCreated.PlaceOrderHandler.Handle(PlaceOrder message) in D:\myStudio2\DDD\PPPofDDD\Code\12 - Integrating Via Messaging\Sales.Orders.OrderCreated\Application\PlaceOrderHandler.cs:line 37
   at NServiceBus.Unicast.HandlerInvocationCache.Invoke(Object handler, Object message, Dictionary`2 dictionary)
   at NServiceBus.Unicast.Behaviors.LoadHandlersBehavior.<Invoke>b__1(Object handlerInstance, Object message)
   at NServiceBus.Unicast.Behaviors.InvokeHandlersBehavior.Invoke(HandlerInvocationContext context, Action next)
   at NServiceBus.Sagas.SagaPersistenceBehavior.Invoke(HandlerInvocationContext context, Action next)
   at NServiceBus.Unicast.Behaviors.SetCurrentMessageBeingHandledBehavior.Invoke(HandlerInvocationContext context, Action next)
   at NServiceBus.Pipeline.PipelineFactory.Execute[T](BehaviorChain`1 pipelineAction, T context)
   at NServiceBus.Pipeline.PipelineFactory.InvokeHandlerPipeline(MessageHandler handler)
   at NServiceBus.Unicast.Behaviors.LoadHandlersBehavior.Invoke(ReceiveLogicalMessageContext context, Action next)
   at NServiceBus.DataBus.DataBusReceiveBehavior.Invoke(ReceiveLogicalMessageContext context, Action next)
   at NServiceBus.Pipeline.PipelineFactory.Execute[T](BehaviorChain`1 pipelineAction, T context)
   at NServiceBus.Unicast.Messages.ExecuteLogicalMessagesBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)
   at NServiceBus.UnitOfWork.UnitOfWorkBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)

Inner Exception 1:
SocketException: No connection could be made because the target machine actively refused it

Last edited by pingpong; April 22nd, 2017 at 12:33 PM..
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
new returns NULL or throws exception? MattCruikshank BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 2nd Ed ISBN: 978-0-470-12167-2 0 March 29th, 2010 09:53 PM
Chapter 12 - Running OfficialFileSTSADMCommand project gets Unhandled Exception. dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 September 3rd, 2009 09:52 PM
Dropdownlist throws exception abhishekkashyap27 C# 2005 2 January 14th, 2008 03:05 PM
in chapter 32 class QuoteServer throws exception vit100 BOOK: Professional C#, 2nd and 3rd Editions 1 January 29th, 2006 06:31 PM

All times are GMT -4. The time now is 01:03 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.