Results 1 to 4 of 4

Thread: Simple Configuration!

  1. #1
    Join Date
    Jun 2007
    Posts
    6

    Default Simple Configuration!

    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.Spr ing101" />
    </objects>
    </spring>
    </configuration>
    Last edited by mettlus; 06-04-2007 at 07:17 PM. Reason: missing info

  2. #2
    Join Date
    Jun 2007
    Posts
    6

    Default

    Messy web.config

    Admin please Retire this Q

  3. #3
    Join Date
    Mar 2007
    Location
    Vladimir, Russia
    Posts
    59

    Default

    Hi.

    Please, post a stacktrace.

    Wish good luck,
    Nop.
    If you don't know where you are going, any road will take you there. Lewis Carol, Alice in Wonderland

  4. #4
    Join Date
    Oct 2005
    Location
    Toulouse, France
    Posts
    1,407

    Default

    Hi mettlus,

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


    Cheers,
    Bruno
    My english is as poor as my taylor is rich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •