I've moved everything to the app.config and no longer get the NullReferenceException, yet it still does not use the Memcache server and instead hits the database. Switching back to the Hashtable provider does work.
On Jan 6, 2:17 pm, sed <[email protected]> wrote: > Nope. It still isn't working but if I stick the Hashtable provider in > there it works. > > No clues anyone as to what I could have misconfigured? > > On Jan 6, 11:28 am, sed <[email protected]> wrote: > > > I'm really struggling with an error I receive when unit testing with > > Memcached configure for the second level cache > > > The stack output shows > > --NullReferenceException > > at Memcached.ClientLibrary.SockIOPool.Initialize() > > at NHibernate.Caches.MemCache.MemCacheProvider.Start(IDictionary`2 > > properties) > > at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, > > IMapping mapping, Settings settings, EventListeners listeners) > > at NHibernate.Cfg.Configuration.BuildSessionFactory() > > C:\MyTrade\Mytrade.Core\Persistence\NHibernateSessionManager.cs > > (23,0): at Mytrade.Core.Persistence.NHibernateSessionManager..ctor() > > C:\MyTrade\Mytrade.Core\Persistence\NHibernateSessionManager.cs > > (16,0): at Mytrade.Core.Persistence.NHibernateSessionManager..cctor() > > > Heres my entire configuration file. I don't see what can be wrong > > > <?xml version="1.0" ?> > > <configuration> > > <configSections> > > <section name="hibernate-configuration" > > type="NHibernate.Cfg.ConfigurationSectionHandler,NHibernate" /> > > <section name="log4net" > > type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> > > <section name="memcache" > > type="NHibernate.Caches.MemCache.MemCacheSectionHandler,NHibernate.Caches.MemCache" > > / > > > </configSections> > > > <memcache> > > <memcached host="192.168.1.6" port="11211" weight="1" /> > > </memcache> > > > <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> > > <session-factory> > > <property name="connection.provider"> > > NHibernate.Connection.DriverConnectionProvider > > </property> > > <property name="dialect"> > > Mytrade.Core.Persistence.Dialect, Mytrade.Core > > </property> > > <property name="connection.driver_class"> > > NHibernate.Driver.SqlClientDriver > > </property> > > <property name="connection.connection_string"> > > connectionstuff > > </property> > > <property > > name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, > > NHibernate.ByteCode.LinFu</property> > > <property > > name="cache.provider_class">NHibernate.Caches.MemCache.MemCacheProvider,NHibernate.Caches.MemCache</ > > property> > > <property name="cache.use_second_level_cache">true</property> > > <property name="cache.use_query_cache">true</property> > > </session-factory> > > </hibernate-configuration> > > > <log4net> > > <appender name="rollingFile" > > type="log4net.Appender.RollingFileAppender,log4net" > > > <param name="File" value="C:\new\log.txt" /> > > <param name="AppendToFile" value="true" /> > > <param name="RollingStyle" value="Date" /> > > <param name="DatePattern" value="yyyy.MM.dd" /> > > <param name="StaticLogFileName" value="true" /> > > <layout type="log4net.Layout.PatternLayout,log4net"> > > <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] > > <%X{auth}> - %m%n" /> > > </layout> > > </appender> > > <root> > > <priority value="ALL" /> > > <appender-ref ref="rollingFile" /> > > </root> > > <logger name="Memcached.ClientLibrary.SockIOPool"> > > <priority value="ALL" /> > > <appender-ref ref="rollingFile" /> > > </logger> > > </log4net> > > </configuration> > > > Does anyone have any ideas?
-- 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.
