dabi
06-05-2007, 04:51 PM
Hi,
I am new to Spring.Net Framework. I am trying out the example: Spring.DataQuickStart.2005. I wrote a web app that would simply invoke the methods on Spring.DataQuickStart and display the results on the browser.
I added the following section to the web.config file of the asp.net web application:
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
<section name="parsers" type="Spring.Context.Support.ConfigParsersSectionHandler , Spring.Core" />
</sectionGroup>
</configSections>
<spring>
<parsers>
<parser namespace="http://www.springframework.net/database" type="Spring.Data.DatabaseConfigParser, Spring.Data" schemaLocation="assembly://Spring.Data/Spring.Data/spring-database.xsd"/>
</parsers>
<context>
<resource uri="assembly://Spring.DataQuickStart.Tests/Spring.DataQuickStart.GenericTemplate/ExampleTests.xml"/>
</context>
</spring>
</configuration>
In my code behind when I use the following statement:
IApplicationContext ctx = new XmlApplicationContext("assembly://Spring.DataQuickStart.Tests/Spring.DataQuickStart.GenericTemplate/ExampleTests.xml");
to instantiate the XmlApplicationContext object, it gives me the following error:
Spring.Objects.Factory.NoSuchObjectDefinitionExcep tion: No object named 'dbProvider' is defined : Cannot find definition for object [dbProvider]
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Type requiredType, Object[] arguments) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 234
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Object[] arguments) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 1242
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 1202
at Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.ResolveReference(IConfigurableOb jectDefinition definition, String name, String argumentName, RuntimeObjectReference reference) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractAutowireCapableObjectFa ctory.cs:line 1717
I don't know where I am going wrong.
Please help
Thanks
Dabi
I am new to Spring.Net Framework. I am trying out the example: Spring.DataQuickStart.2005. I wrote a web app that would simply invoke the methods on Spring.DataQuickStart and display the results on the browser.
I added the following section to the web.config file of the asp.net web application:
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
<section name="parsers" type="Spring.Context.Support.ConfigParsersSectionHandler , Spring.Core" />
</sectionGroup>
</configSections>
<spring>
<parsers>
<parser namespace="http://www.springframework.net/database" type="Spring.Data.DatabaseConfigParser, Spring.Data" schemaLocation="assembly://Spring.Data/Spring.Data/spring-database.xsd"/>
</parsers>
<context>
<resource uri="assembly://Spring.DataQuickStart.Tests/Spring.DataQuickStart.GenericTemplate/ExampleTests.xml"/>
</context>
</spring>
</configuration>
In my code behind when I use the following statement:
IApplicationContext ctx = new XmlApplicationContext("assembly://Spring.DataQuickStart.Tests/Spring.DataQuickStart.GenericTemplate/ExampleTests.xml");
to instantiate the XmlApplicationContext object, it gives me the following error:
Spring.Objects.Factory.NoSuchObjectDefinitionExcep tion: No object named 'dbProvider' is defined : Cannot find definition for object [dbProvider]
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Type requiredType, Object[] arguments) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 234
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Object[] arguments) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 1242
at Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractObjectFactory.cs:line 1202
at Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.ResolveReference(IConfigurableOb jectDefinition definition, String name, String argumentName, RuntimeObjectReference reference) in j:\release\Spring.Net\src\Spring\Spring.Core\Objec ts\Factory\Support\AbstractAutowireCapableObjectFa ctory.cs:line 1717
I don't know where I am going wrong.
Please help
Thanks
Dabi