Deal of the Day

Home » Main » Manning Forums » 2008 » ASP.NET MVC in Action

Thread: populating database

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
disa

Posts: 1
Registered: 4/30/09
populating database
Posted: Apr 30, 2009 6:05 PM
  Click to reply to this thread Reply

Hi

How and when Codecampserver database get populated. I encounter problem while trying to run application. During the app startup an Index method of the HomeController gets called with a UserGroup null reference. Further a GetFutureForUserGroup method on ConferenceRepository gets called and ends in an exception.

Does the exception below rose as of empty database?

System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="NHibernate"
StackTrace:
at NHibernate.Proxy.NHibernateProxyHelper.GuessClass(Object entity)
at NHibernate.Impl.AbstractQueryImpl.SetEntity(String name, Object val)
at CodeCampServer.Infrastructure.DataAccess.Impl.ConferenceRepository.GetFutureForUserGroup(UserGroup usergroup)
at CodeCampServer.UI.Controllers.HomeController.Index(UserGroup userGroup, IConferenceRepository _conferenceRepository) in C:\codecamp\codecampserver-read-only\src\UI\Controllers\HomeController.cs:line 25
at lambda_method(ExecutionScope , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
InnerException:

Thanks in advance

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff