Hi
I've downloaded the latest verson from the trunk. It compiles ok but
throws an exception during startup,, :::::

-------------------------------
Microsoft.Practices.ServiceLocation.ActivationException was unhandled
  Message="Activation error occured while trying to get instance of
type IBrowseArtistViewModel, key \"\""
  Source="Microsoft.Practices.ServiceLocation"
  StackTrace:
       at
Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance
(Type serviceType, String key)
       at
Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance
[TService]()
       at
ChinookMediaManager.GUI.Artifacts.ViewFactory.ResolveViewModel
[TViewModel]() in C:\DSS\Projects\Downloads\unhaddins\Examples
\uNHAddIns.Examples.WPF\ChinookMediaManager.GUI\Artifacts
\ViewFactory.cs:line 32
       at ChinookMediaManager.GUI.Artifacts.ViewFactory.ShowView
[TViewModel]() in C:\DSS\Projects\Downloads\unhaddins\Examples
\uNHAddIns.Examples.WPF\ChinookMediaManager.GUI\Artifacts
\ViewFactory.cs:line 23
       at ChinookMediaManager.GUI.App.OnStartup(StartupEventArgs e) in
C:\DSS\Projects\Downloads\unhaddins\Examples\uNHAddIns.Examples.WPF
\ChinookMediaManager.GUI\App.xaml.cs:line 25
       at System.Windows.Application.<.ctor>b__0(Object unused)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall
(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen
(Object source, Delegate callback, Object args, Boolean
isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate
callback, Object args, Boolean isSingleParameter, Delegate
catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at
System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext
(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object
userData)
       at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup
(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal
(ExecutionContext executionContext, ContextCallback callback, Object
state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd,
Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr
wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall
(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen
(Object source, Delegate callback, Object args, Boolean
isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate
callback, Object args, Boolean isSingleParameter, Delegate
catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl
(DispatcherPriority priority, TimeSpan timeout, Delegate method,
Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke
(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32
msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl
(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame
(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at ChinookMediaManager.GUI.App.Main() in C:\DSS\Projects
\Downloads\unhaddins\Examples\uNHAddIns.Examples.WPF
\ChinookMediaManager.GUI\obj\Debug\App.g.cs:line 48
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String
[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
       at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: Castle.MicroKernel.Facilities.FacilityException
       Message="You have specified a factory ('3ba82b4f-b46a-4dc6-87b6-
fd1b1933d430' - method to be called: Create) for the component
'NHibernate.ISessionFactory' NHibernate.ISessionFactory that failed
during invoke."
       Source="Castle.MicroKernel"
       StackTrace:
            at Castle.Facilities.FactorySupport.FactoryActivator.Create
(Object factoryInstance, String factoryId, MethodInfo
instanceCreateMethod, String factoryCreate, CreationContext context)
            at
Castle.Facilities.FactorySupport.FactoryActivator.Instantiate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create
(CreationContext context)
            at
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve
(CreationContext context)
            at
Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve
(CreationContext context)
            at Castle.MicroKernel.Handlers.DefaultHandler.Resolve
(CreationContext context)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency
(CreationContext context, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve
(CreationContext context, ISubDependencyResolver
contextHandlerResolver, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments
(ConstructorCandidate constructor, CreationContext context, Type[]&
signature)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create
(CreationContext context)
            at
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve
(CreationContext context)
            at Castle.MicroKernel.Handlers.DefaultHandler.Resolve
(CreationContext context)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency
(CreationContext context, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve
(CreationContext context, ISubDependencyResolver
contextHandlerResolver, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments
(ConstructorCandidate constructor, CreationContext context, Type[]&
signature)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create
(CreationContext context)
            at
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve
(CreationContext context)
            at Castle.MicroKernel.Handlers.DefaultHandler.Resolve
(CreationContext context)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency
(CreationContext context, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve
(CreationContext context, ISubDependencyResolver
contextHandlerResolver, ComponentModel model, DependencyModel
dependency)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments
(ConstructorCandidate constructor, CreationContext context, Type[]&
signature)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate
(CreationContext context)
            at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create
(CreationContext context)
            at
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve
(CreationContext context)
            at Castle.MicroKernel.Handlers.DefaultHandler.Resolve
(CreationContext context)
            at Castle.MicroKernel.DefaultKernel.ResolveComponent
(IHandler handler, Type service, IDictionary additionalArguments)
            at Castle.MicroKernel.DefaultKernel.ResolveComponent
(IHandler handler, Type service)
            at Castle.MicroKernel.DefaultKernel.get_Item(Type service)
            at Castle.Windsor.WindsorContainer.Resolve(Type service)
            at
CommonServiceLocator.WindsorAdapter.WindsorServiceLocator.DoGetInstance
(Type serviceType, String key)
            at
Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance
(Type serviceType, String key)
       InnerException: System.Reflection.TargetInvocationException
            Message="Exception has been thrown by the target of an
invocation."
            Source="mscorlib"
            StackTrace:
                 at System.RuntimeMethodHandle._InvokeMethodFast
(Object target, Object[] arguments, SignatureStruct& sig,
MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
                 at System.RuntimeMethodHandle.InvokeMethodFast(Object
target, Object[] arguments, Signature sig, MethodAttributes
methodAttributes, RuntimeTypeHandle typeOwner)
                 at System.Reflection.RuntimeMethodInfo.Invoke(Object
obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean skipVisibilityChecks)
                 at System.Reflection.RuntimeMethodInfo.Invoke(Object
obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture)
                 at System.Reflection.MethodBase.Invoke(Object obj,
Object[] parameters)
                 at
Castle.Facilities.FactorySupport.FactoryActivator.Create(Object
factoryInstance, String factoryId, MethodInfo instanceCreateMethod,
String factoryCreate, CreationContext context)
            InnerException: System.Data.SqlClient.SqlException
                 Message="Cannot open database \"Chinook\" requested
by the login. The login failed.\r\nLogin failed for user 'PREVAS\
\lgli'."
                 Source=".Net SqlClient Data Provider"
                 ErrorCode=-2146232060
                 Class=11
                 LineNumber=65536
                 Number=4060
                 Procedure=""
                 Server="(local)\\SQLEXPRESS"
                 State=1
                 StackTrace:
                      at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
                      at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning
(TdsParserStateObject stateObj)
                      at System.Data.SqlClient.TdsParser.Run
(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader
dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj)
                      at
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
                      at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin
(ServerInfo serverInfo, String newPassword, Boolean
ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
                      at
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance,
SqlConnection owningObject, SqlConnectionString connectionOptions,
Int64 timerStart)
                      at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist
(SqlConnection owningObject, SqlConnectionString connectionOptions,
String newPassword, Boolean redirectedUserInstance)
                      at
System.Data.SqlClient.SqlInternalConnectionTds..ctor
(DbConnectionPoolIdentity identity, SqlConnectionString
connectionOptions, Object providerInfo, String newPassword,
SqlConnection owningObject, Boolean redirectedUserInstance)
                      at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection
(DbConnectionOptions options, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection owningConnection)
                      at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection
(DbConnection owningConnection, DbConnectionPool pool,
DbConnectionOptions options)
                      at
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject)
                      at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest
(DbConnection owningObject)
                      at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
                      at
System.Data.ProviderBase.DbConnectionFactory.GetConnection
(DbConnection owningConnection)
                      at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection
(DbConnection outerConnection, DbConnectionFactory connectionFactory)
                      at System.Data.SqlClient.SqlConnection.Open()
                      at
NHibernate.Connection.DriverConnectionProvider.GetConnection()
                      at
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare
()
                      at
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect
dialect, IConnectionHelper connectionHelper)
                      at
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory
sessionFactory)
                      at NHibernate.Impl.SessionFactoryImpl..ctor
(Configuration cfg, IMapping mapping, Settings settings,
EventListeners listeners)
                      at
NHibernate.Cfg.Configuration.BuildSessionFactory()
                      at
uNhAddIns.SessionEasier.SessionFactoryProvider.Initialize()
                      at
uNhAddIns.SessionEasier.SessionFactoryProvider.GetFactory(String
factoryId)
                      at
ChinookMediaManager.GuyWire.Configurators.NHibernateConfigurator.<>c__DisplayClass4.<Configure>b__1
() in C:\DSS\Projects\Downloads\unhaddins\Examples
\uNHAddIns.Examples.WPF\ChinookMediaManager.GuyWire\Configurators
\NHibernateConfigurator.cs:line 44
                      at
Castle.MicroKernel.Registration.GenericFactory`1.Create()
                 InnerException:
----------------------------------------------

This exception is thrown from :
        public TViewModel ResolveViewModel<TViewModel>()
        {
            return _serviceLocator.GetInstance<TViewModel>();
        }

---------------

I unable to figure out why,, maby I missed something??
(generateAssembyInfo.bat is executed without errors)

Is there any documentation for this project?? I havent been able to
find any,,, but my wife tells me I'm bad at serarching ... :)

//ls








On 16 Okt, 14:22, José F. Romaniello <[email protected]> wrote:
> You are wrong. You have to use "INotifyCollectionChanged" there is one class
> in the .net framework that implements INotifyCollectionChanged,
> ObservableCollection.
>
> So, in transient instances you have to put a observablecollection,... For
> persisted entities, you should write a nhibernate collection that implements
> INotifyCollectionChanged
>
> *BUT*, fortunately in unofficial nhibernate addins, we have already done
> this. The project is named "uNhAddIns.WPF".
>
> And the only thing you have to do is to configure ONCE the collection type
> factory.... And all collections will implement INotifyCollectionChanged.
>
>   e.Configuration.Properties[Environment.CollectionTypeFactoryClass]
> = typeof (WpfCollectionTypeFactory).AssemblyQualifiedName;
>
> BTW; in unhaddins we have some code for the inotifypropertychanged 
> too:http://jfromaniello.blogspot.com/2009/10/introducing-unhaddinscompone...
>
> 2009/10/16 LasseL <[email protected]>
>
>
>
>
>
> > Hi
>
> > I've read Ayende's artikle with great intrest (
>
> >http://ayende.com/Blog/archive/2009/08/07/nhibernate-amp-inotifyprope...
> > ).
>
> > My business classes contains a lot of propertys of type IList<T>.
> > I've tried to extend Ayende's ideas to also take care of the IList<T>
> > situation,,,  fire the INotifyPropertyChanged event when the list is
> > modified. So far no sucess,,, can anyone help me?
>
> > //regards
> > //lasse
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to