ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Svar: Re: 1.2 and 1.6 error on SqlMap.config
Date Thu, 02 Jun 2005 13:03:18 GMT
I think you need to put double quotes around the string values in the
file. They may have been lost when you copied and pasted the file. Here
is a corrected <database> node without the 'default' attribute:

<database> 
 <provider name="${provider}"/> 
 <dataSource name="budgetmodel.datamapper" 
connectionString="${connectionString}"/> 
</database> 

--- Morten Schmidt <sch@knowledgelab.sdu.dk> wrote:

> Sorry... Didn't think there. Here it is: 
>  
> [snip] 
> <?xml version=1.0 encoding=UTF-8 ?> 
> <sqlMapConfig 
>   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 
>   xsi:noNamespaceSchemaLocation=SqlMapConfig.xsd> 
>  
> <properties resource=./Resources/Properties.xml/> 
>  
> <settings> 
> <setting useStatementNamespaces=true/> 
> <setting cacheModelsEnabled=true/> 
> </settings> 
>  
> <database> 
> <provider name=${provider}/> 
> <dataSource name=budgetmodel.datamapper default=true 
> connectionString=${connectionString}/> 
> </database> 
>  
> <sqlMaps> 
> <sqlMap resource=./Resources/AccessProfile.xml/> 
> <sqlMap resource=./Resources/BudgetPeriod.xml/> 
> <sqlMap resource=./Resources/BudgetValue.xml/> 
> <sqlMap resource=./Resources/NumberStyle.xml/> 
> <sqlMap resource=./Resources/Sequence.xml/> 
> <sqlMap resource=./Resources/StyleSheet.xml/> 
> <sqlMap resource=./Resources/UserData.xml/> 
> <sqlMap resource=./Resources/Page.xml/> 
> </sqlMaps> 
>  
> </sqlMapConfig> 
> [snap] 
>  
> I checked all resource files and the property file, but they do not
> contain default either... 
>  
> /morten
> 
> >>>rongrabowski@yahoo.com 06/02/05 1:54 pm >>>
> It would be helpful if we could see your sqlMap.config file. It
> should
> not contain any attributes named default. The error message says that
> you have the attribute default somewhere in the file.
> 
> --- Morten Schmidt <sch@knowledgelab.sdu.dk> wrote:
> 
> >OK, I just upgraded to the new ALPHA's
> > 
> >I get the following error:
> > 
> >[snip]
> > Invalid SqlMap.config document. cause :The 'default' attribute is
> >not
> >declared. An error occurred at , (1, 386).
> >Description: An unhandled exception occurred during the execution of
> >the
> >current web request. Please review the stack trace for more
> >information
> >about the error and where it originated in the code.
> > 
> >Exception Details:
> >IBatisNet.Common.Exceptions.ConfigurationException:
> >Invalid SqlMap.config document. cause :The 'default' attribute is
> not
> >declared. An error occurred at , (1, 386).
> >[snap]
> > 
> >and the Stack trace:
> > 
> >[snip]
> >[ConfigurationException: Invalid SqlMap.config document. cause :The
> >'default' attribute is not declared. An error occurred at , (1,
> 386).
> >
> >]
> >  
> >
>
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode
> >section, String schemaFileName) +446
> >  
>
>IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
> >document, DataSource dataSource, Boolean useConfigFileWatcher,
> >Boolean
> >isCallFromDao) +99
> > 
> >[ConfigurationException:
> >- The error occurred while Validate SqlMap config.
> >- The error occurred in The 'default' attribute is not declared. An
> >error occurred at , (1, 386).
> >.]
> >  
>
>IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
> >document, DataSource dataSource, Boolean useConfigFileWatcher,
> >Boolean
> >isCallFromDao) +164
> >  
> >
>
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String
> >resource, ConfigureHandler configureDelegate) +196
> >   IBatisNet.DataMapper.Mapper.InitMapper() +65
> >   IBatisNet.DataMapper.Mapper.Instance() +64
> >   BudgetModel.Model.Helper.UserDataHelper.UserLogin(String
> username,
> >String uPassword) +164
> >   BudgetModel.login.ok_Click(Object sender, EventArgs e) in
> >C:\Documents and
> >Settings\kel\VSWebCache\til.busieco.sdu.dk_1000\login.aspx.cs:103
> >   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> >  
> >
>
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> >eventArgument) +57
> >   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> >sourceControl, String eventArgument) +18
> >   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> >postData)
> >+33
> >   System.Web.UI.Page.ProcessRequestMain() +1292
> >[snap]
> > 
> >What wen't wrong? It worked with my own compile... but there I had
> to
> >leave out some code...
> > 
> >/morten
> >
> >
> 
> 
> 


Mime
View raw message