Looks like you're referencing the special "app_code" assembly, which is
only available in an ASP.NET context and not in a test.


--
Mauricio

On Fri, Nov 18, 2016 at 4:57 PM, hammett <hamm...@gmail.com> wrote:

> See
>
> > at FramesDirectAPIs.SearchCatalogcl.ProcessText() in
> c:\Code\utils\qc\UnitTesting\Web App\admin 
> webapp\Old_App_Code\SearchCatalogcl.cs:line
> 53
>
> and
>
> > at System.RuntimeType.MakeGenericType(Type[] instantiation)
> >       at Castle.Facilities.SolrNetIntegration.
> SolrNetFacility.RegisterCore(SolrCore core)
> >       at Castle.Facilities.SolrNetIntegration.SolrNetFacility.Init()
>
> I'd guess that you're missing some assembly references, which is
> causing the runtime error.
>
>
>
>
>
> On Thu, Nov 17, 2016 at 4:00 PM, 'Tim' via Castle Project Users
> <castle-project-users@googlegroups.com> wrote:
> > Hello,
> >
> > We are using Castle and Windsor to connect with solr. The
> WindsorContainer
> > is created in an .dll that is referenced by my unit testing project. The
> > connection works fine outside of the unit testing. The following code
> > produces errors:
> >
> > WindsorContainer m_oWindsorContainer = new WindsorContainer(new
> > XmlInterpreter(new ConfigResource("castle")));
> >
> >
> >
> > web.config:
> > <configSections>
> >     <section name="castle"
> > type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,
> > Castle.Windsor" />
> >   </configSections>
> >   <castle>
> >     <facilities>
> >       <facility id="solr"
> > type="Castle.Facilities.SolrNetIntegration.SolrNetFacility, SolrNet">
> >         <solrURL>http://solrmainserver:8080/solr/products</solrURL>
> >         <cores>
> >           <core id="primary">
> >             <documentType>FramesDirectAPIs.SolrProductCorecl,
> > app_code</documentType>
> >             <url>http://solrmainserver:8080/solr/products</url>
> >           </core>
> >           <core id="secondary">
> >             <documentType>FramesDirectAPIs.SolrProductCorecl,
> > app_code</documentType>
> >             <url>http://solrbackupserver:8080/solr/products</url>
> >           </core>
> >           <core id="primarywebpages">
> >             <documentType>FramesDirectAPIs.SolrWebPagesCorecl,
> > app_code</documentType>
> >             <url>http://solrmainserver:8080/solr/webpages</url>
> >           </core>
> >           <core id="secondaryWebpages">
> >             <documentType>FramesDirectAPIs.SolrWebPagesCorecl,
> > app_code</documentType>
> >             <url>http://solrbackupserver:8080/solr/webpages</url>
> >           </core>
> >           <core id="primarycustomer">
> >             <documentType>FramesDirectAPIs.SolrCustomerCorecl,
> > app_code</documentType>
> >             <url>http://solrmainserver:8080/solr/customers</url>
> >           </core>
> >           <core id="secondarycustomer">
> >             <documentType>FramesDirectAPIs.SolrCustomerCorecl,
> > app_code</documentType>
> >             <url>http://solrbackupserver:8080/solr/customers</url>
> >           </core>
> >         </cores>
> >       </facility>
> >     </facilities>
> >   </castle>
> >
> >
> > Stack Trace:
> > System.ArgumentNullException was unhandled by user code
> >   HResult=-2147467261
> >   Message=Value cannot be null.
> >   Source=mscorlib
> >   StackTrace:
> >        at System.RuntimeType.MakeGenericType(Type[] instantiation)
> >        at
> > Castle.Facilities.SolrNetIntegration.SolrNetFacility.RegisterCore(
> SolrCore
> > core)
> >        at Castle.Facilities.SolrNetIntegration.SolrNetFacility.Init()
> >        at
> > Castle.MicroKernel.Facilities.AbstractFacility.Castle.
> MicroKernel.IFacility.Init(IKernel
> > kernel, IConfiguration facilityConfig) in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\MicroKernel\Facilities\
> AbstractFacility.cs:line
> > 86
> >        at Castle.MicroKernel.DefaultKernel.AddFacility(String key,
> IFacility
> > facility) in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\
> MicroKernel\DefaultKernel.cs:line
> > 327
> >        at Castle.Windsor.WindsorContainer.AddFacility(String key,
> IFacility
> > facility) in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\
> WindsorContainer.cs:line
> > 552
> >        at
> > Castle.Windsor.Installer.DefaultComponentInstaller.SetUpFacilities(
> IConfiguration[]
> > configurations, IWindsorContainer container, IConversionManager
> converter)
> > in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\Installer\
> DefaultComponentInstaller.cs:line
> > 177
> >        at
> > Castle.Windsor.Installer.DefaultComponentInstaller.
> SetUp(IWindsorContainer
> > container, IConfigurationStore store) in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\Installer\
> DefaultComponentInstaller.cs:line
> > 52
> >        at Castle.Windsor.WindsorContainer.RunInstaller() in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\
> WindsorContainer.cs:line
> > 316
> >        at Castle.Windsor.WindsorContainer..ctor(
> IConfigurationInterpreter
> > interpreter) in
> > e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\
> WindsorContainer.cs:line
> > 88
> >        at FramesDirectAPIs.SearchCatalogcl.ProcessText() in
> > c:\Code\utils\qc\UnitTesting\Web App\admin
> > webapp\Old_App_Code\SearchCatalogcl.cs:line 53
> >        at
> > AdminUnitTesting.Tests.SearchCatalogTestscl.SearchCatalogcl_Test(String
> > sSearchText, Int32 iWebsiteId) in
> > c:\Code\utils\qc\UnitTesting\AdminUnitTesting\AdminUnitTesting\Tests\
> SearchCatalogTestscl.cs:line
> > 40
> >   InnerException:
> >
> >
> >
> > I've checked the XmlConfiguration as well as the ConfigResource objects
> and
> > both of them have values and are not null. Any help would be appreciated.
> >
> > Thanks,
> > Tim
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Castle Project Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to castle-project-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to castle-project-users@
> googlegroups.com.
> > Visit this group at https://groups.google.com/group/castle-project-users
> .
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Cheers,
> hammett
> http://www.d-collab.com/
> http://www.hammettblog.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to castle-project-users+unsubscr...@googlegroups.com.
> To post to this group, send email to castle-project-users@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/castle-project-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to