dfed
08-18-2005, 11:19 AM
I try to use PropertyPlaceholderConfigurer but get an error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Exception creating section handler.
Source Error:
Line 6:
Line 7: </sectionGroup>
Line 8: <section name="hibernateConfiguration" type="System.Configuration.NameValueSectionHandler" />
Line 9: </configSections>
Line 10:
Source File: C:\work\projects\QueenGroup\development\code\Queen Solution\QueenWeb\web.config Line: 8
This is snippet from my Web.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core" />
</sectionGroup>
<section name="hibernateConfiguration" type="System.Configuration.NameValueSectionHandler" />
</configSections>
<hibernateConfiguration>
<add key="configPath" value="hibernate.cfg.xml" />
</hibernateConfiguration>
<spring>
<context type="Spring.Context.Support.WebApplicationContext, Spring.Web">
<resource uri="assembly://core/kck.nspike.core/core.spring.xml" />
<resource uri="assembly://QueenWeb/qngr.web/spring.xml" />
</context>
</spring>
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
</httpHandlers>
</system.web>
</configuration>
and a snippet from core.spring.xml:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object name="appConfigPropertyHolder"
type="Spring.Objects.Factory.Config.PropertyPlaceholderC onfigurer, Spring.Core">
<property name="configSections" value="hibernateConfiguration" />
</object>
<object
id="hibernateConfig"
type="kck.nspike.core.persistence.hibernate.config.Hiber nateConfig, core">
<property name="configPath" value="${configPath}"></property>
</object>
</objects>
All seems ok. I write like in manual.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Exception creating section handler.
Source Error:
Line 6:
Line 7: </sectionGroup>
Line 8: <section name="hibernateConfiguration" type="System.Configuration.NameValueSectionHandler" />
Line 9: </configSections>
Line 10:
Source File: C:\work\projects\QueenGroup\development\code\Queen Solution\QueenWeb\web.config Line: 8
This is snippet from my Web.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core" />
</sectionGroup>
<section name="hibernateConfiguration" type="System.Configuration.NameValueSectionHandler" />
</configSections>
<hibernateConfiguration>
<add key="configPath" value="hibernate.cfg.xml" />
</hibernateConfiguration>
<spring>
<context type="Spring.Context.Support.WebApplicationContext, Spring.Web">
<resource uri="assembly://core/kck.nspike.core/core.spring.xml" />
<resource uri="assembly://QueenWeb/qngr.web/spring.xml" />
</context>
</spring>
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
</httpHandlers>
</system.web>
</configuration>
and a snippet from core.spring.xml:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object name="appConfigPropertyHolder"
type="Spring.Objects.Factory.Config.PropertyPlaceholderC onfigurer, Spring.Core">
<property name="configSections" value="hibernateConfiguration" />
</object>
<object
id="hibernateConfig"
type="kck.nspike.core.persistence.hibernate.config.Hiber nateConfig, core">
<property name="configPath" value="${configPath}"></property>
</object>
</objects>
All seems ok. I write like in manual.