PDA

View Full Version : Simple Configuration!


mettlus
06-04-2007, 08:16 PM
I am just getting hit with this error "Error instantiating spring.root" everytime i am trying to run my Console app.
VS2k5

Heres the Main.cs of my Console App

static void Main(string[] args)
{
IApplicationContext ctx = ContextRegistry.GetContext();
SQLDALAccessor dal = (SQLDALAccessor)ctx.GetObject("xyz");
}

App.Config
============
<configuration>
<!--
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLExpress;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>-->
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="config://spring/objects"/>
</context>
<objects xmlns="http://www.springframework.net" >
<object id="xyz" type="NSpring.Spring101.SQLDALAccessor,NSpring.Spring101" />
</objects>
</spring>
</configuration>

mettlus
06-05-2007, 03:32 AM
Messy web.config

Admin please Retire this Q

Nop
06-05-2007, 07:23 AM
Hi.

Please, post a stacktrace.

Wish good luck,
Nop.

Bruno Baia
06-05-2007, 11:51 AM
Hi mettlus,

np, this happens to everyone :)
You should take a look to inner exceptions when you got this kind of error.


Cheers,
Bruno