ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Smith" <douglas.sm...@aciwebs.com>
Subject RE: iBatis Newbie: problem with providers.config
Date Tue, 18 Jul 2006 14:47:14 GMT

Thanks Rob :-)

Posting your file helped me figure out the problem.

Looks like I was missing the xmlns attributes in the <providers> tag.

<providers 
 xmlns="http://ibatis.apache.org/providers" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

However, the providers.config in the tutorial is missing the namespace,
(which of course is the file I had copied to my project).

	\tutorial\WebView\providers.config

Next time, I will use the file from the latest version download :-) 



-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Tuesday, July 18, 2006 12:18 AM
To: user-cs@ibatis.apache.org
Subject: Re: iBatis Newbie: problem with providers.config

What does your providers.config file look like?

<?xml version="1.0" encoding="utf-8"?>
<providers 
 xmlns="http://ibatis.apache.org/providers" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<clear/>

<provider 
 name="sqlServer1.1" 
 description="Microsoft SQL Server, provider V1.0.5000.0 in framework
.NET V1.1" 
 enabled="true"
 default="true" 
 assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" 
 connectionClass="System.Data.SqlClient.SqlConnection" 
 commandClass="System.Data.SqlClient.SqlCommand" 
 parameterClass="System.Data.SqlClient.SqlParameter" 
 parameterDbTypeClass="System.Data.SqlDbType" 
 parameterDbTypeProperty="SqlDbType" 
 dataAdapterClass="System.Data.SqlClient.SqlDataAdapter" 
 commandBuilderClass="System.Data.SqlClient.SqlCommandBuilder" 
 usePositionalParameters="false" 
 useParameterPrefixInSql="true" 
 useParameterPrefixInParameter="true" 
 parameterPrefix="@"
 allowMARS="false"
 />
</providers>

--- Douglas Smith <douglas.smith@aciwebs.com> wrote:

> Hello I need some help.
> 
>  
> 
> I have been able to test and debug my test classes using NUnit, but I
> have not been able to get past this problem (error message from NUnit
> GUI):
> 
>  
> 
>  
> 
> ManageData.aci.matweb.data.test_Forecaster.GetData :
> IBatisNet.Common.Exceptions.ConfigurationException : 
> 
> - The error occurred while load DataBase Provider.
> 
> - The error occurred in <provider name="sqlServer1.1"
> xmlns="http://ibatis.apache.org/dataMapper" />.  
> 
> - Check the sqlServer1.1.
> 
>   ----> IBatisNet.Common.Exceptions.ConfigurationException : Error
> while
> configuring the Provider named "sqlServer1.1". Cause : The provider
> is
> not in 'providers.config'.
> 
>  
> 
>  
> 
> The provider *is* in providers.config, and the system *is* finding
> the
> file; If I rename providers.config, I get a different file not found
> error.
> 
>  
> 
> Here is my SQLMap.config file:
> 
>  
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper" >
> 
>  
> 
>       <settings>
> 
>             <setting useStatementNamespaces="false"/>
> 
>             <setting cacheModelsEnabled="false"/>
> 
>       </settings>
> 
>       
> 
>       <database>  
> 
>             <provider name="sqlServer1.1" />
> 
>             <dataSource name="Forecasters"
> connectionString="Server=#####;Database=#####;User
> ID=####;Password=####;Trusted_Connection=False"/>
> 
>       </database>
> 
>  
> 
>       <sqlMaps>
> 
>             <sqlMap resource="../XMLMaps/Forecaster.xml"/>
> 
>       </sqlMaps>
> 
>       
> 
> </sqlMapConfig>
> 
>  
> 
>  
> 
> I am using #### to hide security details while sending to the list.
> 
>  
> 
> I cut my providers.config file down to just that single provider, and
> the "enabled" attribute is *true*
> 
>  
> 
> Renaming the provider has no effect.
> 
>  
> 
> Any help appreciated :-)
> 
>  
> 
>  
> 
> 




Mime
View raw message