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,