Looking at the assembly with the file system properties and the sn.exe
tool seems to be giving a different set of results to the .NET
Reflector.

The .NET Reflector (http://www.aisto.com/roeder/dotnet) thinks that the
strong name for the assembly is:

System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

I am not sure why this is different to the Public key token displayed by
sn.exe. Try the above details.

Also the System.Data.OracleClient references the following DLLs:

mtxoci8.dll
oci.dll
oramts.dll

I am assuming that these either come with the OracleClient or are part
of the Oracle client tools for windows. These DLLs need to be located
either in the windows system32 directory or the application bin
directory for the Windows DLL loader to find them.

Nicko


> -----Original Message-----
> From: Ping Xie [mailto:[EMAIL PROTECTED] 
> Sent: 11 August 2004 16:23
> To: Log4NET User
> Subject: RE: Error using ADONetAppender
> 
> 
> Nicko, 
> 
> Thank you very much for your response. I found out the 
> version number and public key token of 
> System.Data.OracleClient assembly and modified my 
> configuration file. But I still got the same error. 
> 
> System.Data.OracleClient.dll is in 
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 directory of my 
> machine. I had put this directory in the Path. I also tried 
> to copy the dll to the application exe directory. It has the 
> same result. I searched my machine. There is only one 
> System.Data.OracleClient.dll.  What else could be wrong? 
> 
> The following are  my new config and result. 
> 
> Config 
> --------------------------------------------------------------
> -----------------------
> <appender name="ADONetAppender_Oracle" 
> type="log4net.Appender.ADONetAppender" > 
>                     <param name="ConnectionType" 
> value="System.Data.OracleClient.OracleConnection, 
> System.Data.OracleClient, Version=1.1.4322.573, 
> Culture=neutral, PublicKeyToken=350c7afdc4c296b5" /> 
>                             <param name="ConnectionString" 
> value="data source=[proddevdatabase];User 
> ID=[chris9];Password=[chris9]" /> 
>                             <param name="CommandText" 
> value="INSERT INTO Log (Datetime, 
> Thread,Log_Level,Logger,Message) VALUES 
> (:log_date,:thread,:log_level,:logger, :message)" /> 
>                     <param name="BufferSize" value="128" /> 
>                     <param name="Parameter"> ...... 
> --------------------------------------------------------------
> ----------------------------------- 
> 
> 
> Result 
> --------------------------------------------------------------
> ----------------------
> log4net:ERROR [ADONetAppender] Failed to load connection type 
> [System.Data.Oracl eClient.OracleConnection, 
> System.Data.OracleClient, Version=1.1.4322.573, Cultur 
> e=neutral, PublicKeyToken=350c7afdc4c296b5]
> System.IO.FileNotFoundException: File or assembly name 
> System.Data.OracleClient,  or one of its dependencies, was not found. 
> File name: "System.Data.OracleClient" 
>    at System.Type.GetType(String typeName, Boolean throwOnError) 
>    at log4net.Appender.ADONetAppender.ResolveConnectionType() 
> 
> === Pre-bind state information ===
> LOG: DisplayName = System.Data.OracleClient, 
> Version=1.1.4322.573, Culture=neutr al, 
> PublicKeyToken=350c7afdc4c296b5
>  (Fully-specified)
> LOG: Appbase = C:\hv\HF 
> Security\Log4net\log4net-1.2.0-beta8\examples\net\1.0\Tu
> torials\ConsoleApp\cs\build\debug\
> LOG: Initial PrivatePath = NULL
> Calling assembly : log4net, Version=1.2.0.30714, 
> Culture=neutral, PublicKeyToken =b32731d11ce58905. 
> ===
> --------------------------------------------------------------
> -------------------------- 
> 
> I appreciate it. 
> 
> Ping Xie
> 
> CACI
> 4831 Walden Lane
> Lanham, MD 20706
> [EMAIL PROTECTED]
> (301) 306-8200 - Main
> (301) 306-2829 - Direct
> 
> 
> 
> 
>       "Nicko Cadell" <[EMAIL PROTECTED]> 
> 
> 08/11/2004 09:36 AM 
> Please respond to "Log4NET User"         
>         To:        "Log4NET User" <log4net-user@logging.apache.org> 
>         cc:         
>         Subject:        RE:  Error using ADONetAppender
> 
> 
> 
> 
> > I'm try to log messages to Oracle database. I got the 
> following debug 
> > errors when run my application.
> > 
> > --------------------------------------------------------------
> > -----------------------------------------------------------------
> > log4net:ERROR [ADONetAppender] Failed to load connection type 
> > [System.Data.Oracl 
> eClient.OracleConnection,System.Data.OracleClient,
> > Version=1.2.0.30714, Culture= 
> neutral,PublicKeyToken=b32731d11ce58905]
> > System.IO.FileLoadException: The located assembly's manifest 
> > definition with nam e 'System.Data.OracleClient' does not match the 
> > assembly reference.
> 
> This means that the assembly specified in the config file for 
> the OracleClient does not match the manifest of the 
> System.Data.OracleClient.dll assembly found on disk.
> 
> In the config file you have specified the ADO.NET provider to use as:
> 
> System.Data.OracleClient.OracleConnection,System.Data.OracleClient,
> Version=1.2.0.30714, Culture=neutral,PublicKeyToken=b32731d11ce58905
> 
> The version number and public key are not correct for the 
> System.Data.OracleClient assembly. Try the following: 
> 
> Version=1.0.3300.0
> PublicKeyToken=b77a5c561934e089
> 
> If you still get the same error then you will need to find 
> your System.Data.OracleClient assembly and find the correct 
> version number and public key token from the file. You can 
> get the version from the file properties dialog. To get the 
> public key token you need to use sn.exe with the -t option. 
> Sn.exe is shipped with the .net SDK in VisualStudio.
> 
> 
> Nicko
> 
> > File name: "System.Data.OracleClient" 
> >    at System.Type.GetType(String typeName, Boolean throwOnError) 
> >    at log4net.Appender.ADONetAppender.ResolveConnectionType()
> > 
> > === Pre-bind state information ===
> > LOG: DisplayName = System.Data.OracleClient, Version=1.2.0.30714, 
> > Culture=neutra l, PublicKeyToken=b32731d11ce58905
> >  (Fully-specified)
> > LOG: Appbase = C:\hv\HF
> > Security\Log4net\log4net-1.2.0-beta8\examples\net\1.0\Tu
> > torials\ConsoleApp\cs\build\debug\
> > LOG: Initial PrivatePath = NULL
> > Calling assembly : log4net, Version=1.2.0.30714, Culture=neutral, 
> > PublicKeyToken =b32731d11ce58905.
> > ===
> > 
> > LOG: Publisher policy file is not found. 
> > LOG: Host configuration file not found. 
> > LOG: Using machine configuration file from
> > C:\WINDOWS\Microsoft.NET\Framework\v1
> > .1.4322\config\machine.config. 
> > LOG: Post-policy reference: System.Data.OracleClient, 
> > Version=1.2.0.30714, Cultu re=neutral, 
> PublicKeyToken=b32731d11ce58905
> > LOG: Attempting download of new URL file:///C:/hv/HF 
> > Security/Log4net/log4net-1.
> > 2.0-beta8/examples/net/1.0/Tutorials/ConsoleApp/cs/build/debug
> > /System.Data.Oracl
> > eClient.DLL. 
> > WRN: Comparing the assembly name resulted in the mismatch: 
> > Minor Version
> > 
> > --------------------------------------------------------------
> > ---------------------------------------------------------------
> > 
> > The following is the ADONetAppender portion of my config file. Does 
> > anyone know what is wrong?
> > 
> > --------------------------------------------------------------
> > -------------------------------------------------------------- 
> >         <appender name="ADONetAppender_Oracle" 
> > type="log4net.Appender.ADONetAppender" > 
> >                     <param name="ConnectionType" 
> > value="System.Data.OracleClient.OracleConnection,System.Data.O
> > racleClient, Version=1.2.0.30714,
> > Culture=neutral,PublicKeyToken=b32731d11ce58905" /> 
> >                             <param name="ConnectionString" 
> > value="data source=[netbltsdb1];User 
> ID=[docex];Password=[docex]" /> 
> >                             <param name="CommandText" 
> > value="INSERT INTO Log (Datetime,
> > Thread,Log_Level,Logger,Message) VALUES 
> > (:log_date,:thread,:log_level,:logger,:message)" />
> >                     <param name="BufferSize" value="128" /> 
> >                     <param name="Parameter"> 
> >                         <param name="ParameterName" 
> > value=":log_date" /> 
> >                         <param name="DbType" value="Date" /> 
> >                         <param name="Layout" 
> > type="log4net.Layout.RawTimeStampLayout" /> 
> >                     </param> 
> >                     <param name="Parameter"> 
> >                         <param name="ParameterName" 
> > value=":thread" /> 
> >                         <param name="DbType" value="String" /> 
> >                         <param name="Size" value="255" /> 
> >                         <param name="Layout" 
> > type="log4net.Layout.PatternLayout"> 
> >                                 <param name="ConversionPattern" 
> > value="%t" />
> >                         </param> 
> >                     </param> 
> >                     <param name="Parameter"> 
> >                         <param name="ParameterName" 
> > value=":log_level" /> 
> >                         <param name="DbType" value="String" /> 
> >                         <param name="Size" value="50" /> 
> >                         <param name="Layout" 
> > type="log4net.Layout.PatternLayout"> 
> >                                 <param name="ConversionPattern" 
> > value="%p" />
> >                         </param> 
> >                     </param> 
> >                     <param name="Parameter"> 
> >                         <param name="ParameterName" 
> > value=":logger" /> 
> >                         <param name="DbType" value="String" /> 
> >                         <param name="Size" value="255" /> 
> >                         <param name="Layout" 
> > type="log4net.Layout.PatternLayout"> 
> >                                 <param name="ConversionPattern" 
> > value="%c" />
> >                         </param> 
> >                     </param> 
> >                     <param name="Parameter"> 
> >                         <param name="ParameterName" 
> > value=":message" /> 
> >                         <param name="DbType" value="String" /> 
> >                         <param name="Size" value="4000" /> 
> >                         <param name="Layout" 
> > type="log4net.Layout.PatternLayout"> 
> >                                 <param name="ConversionPattern" 
> > value="%m" />
> >                         </param> 
> >                     </param> 
> >         </appender>
> > --------------------------------------------------------------
> > --------------------------------------------------------------
> > --------
> > 
> > Thank you in advance. 
> > 
> > Ping Xie
> > 
> > CACI
> > 4831 Walden Lane
> > Lanham, MD 20706
> > [EMAIL PROTECTED]
> > (301) 306-8200 - Main
> > (301) 306-2829 - Direct
> > 
> > 
> 
> 
> 
> 

Reply via email to